Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (D-E)
Guardian Procedure Calls Reference Manual522629-013
4-88
DNUMOUT Procedure
is an array where the converted value is returned in ASCII representation, right-
justified in
ascii-result[width - 1], with zero-fill by default.
unsigned-doubleword input
INT(32):value
is the unsigned double-word integer to be converted.
base input
INT:value
is the number base for the resulting conversion. Any number in the range 2
through 36 is valid.
width input
INT:value
is the maximum number of characters permitted in
ascii-result. The output
value will be right-justified to the specified width; characters may be truncated on
the left side. If
width is negative or not supplied, DNUMOUT calculates and uses
the minimum width necessary to hold the entire value.
flags input
INT:value
may be used to alter the formatting used by DNUMOUT as follows:
<0:14>
Must be zero
<15> 1 Blank-fill on left
0 Zero-fill on left (the default)
If not supplied,
flags defaults to zero.
Considerations
If width is too small to contain the number, the most significant digits are lost.
Example
STRING .buffer[0:10] := [" "];
INT(32) dnum := 2147483640D;
INT base := 10;
INT width := -1;
.
.
CALL DNUMOUT ( buffer, dnum, base, width );
IF width < 0 THEN ...