Compiler Library/XL Reference Manual (32650-90029)
3- 5
Declaration
TYPE bytearray = PACKED ARRAY [1..N] OF CHAR;
PROCEDURE HPINEXT (
ANYVAR value : INTEGER;
datatype : SHORTINT;
fieldwidth : SHORTINT;
decplaces : SHORTINT;
kind : SHORTINT;
scale : SHORTINT;
ANYVAR charstring : bytearray;
VAR error : SHORTINT
)
OPTION UNCHECKABLE_ANYVAR;
EXTERNAL;
Attributes
Parameters value = 32-bit pointer (address) to the first
(Input): word of the internal representation to
be converted.
datatype = The type of internal representation:
0 = SHORTINT
1 = REAL
-1 = INTEGER
-2 = LONGREAL
fieldwidth = Field width
w
of the ASCII string,
including all special characters. See
the kind parameter description for more
details.
Set fieldwidth to at least decplaces+6
to allow for special characters when
kind equals 3 (G
w.d
format) or 2 (D
w.d
format) or 1 (E
w.d
format). If a
positive scale factor is also used, set
fieldwidth to at least decplaces+7.
decplaces = The number of fractional digits
d
in
the ASCII string. If decplaces is
equal to zero, no fractional digits are
included in the output, even though a
decimal point is included. If
fieldwidth <= zero or decplaces < zero,
an error is implied and error is set to
-1.
kind = The kind of conversion desired. See
Table 3-2 for a list of possible values
of kind.