Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (N)
Guardian Procedure Calls Reference Manual522629-013
10-57
NUMIN Procedure
where “%” means treat the number as a binary, octal, or hexadecimal value (as
indicated) regardless of the specified
base. Note that nonnumeric applies only
to hexadecimal values.
signed-result output
INT:ref:1
returns the result of the conversion.
base input
INT:value
specifies the number base of
ascii-num. Legitimate values are 2 through 10
and 16.
status output
INT:ref:1
returns a number that indicates the outcome of the conversion. The values for
status are:
1 Nonexistent number (string does not start with “+,” “-,” “%,” or numeric)
0 Valid conversion
-1 Illegal integer (number cannot be represented in 15 bits) or bad character in
ascii-num.
Considerations
When number conversion stops
Number conversion stops on the first ASCII numeric character representing a
value greater than
base -1 or a nonnumeric ASCII character.
Base-10 numeric value range
Base-10 numeric values must be in the range of -32768 through 32767. Numeric
values in other number bases are accepted if they can be represented in 16 bits.
Note that the magnitude is computed first, so the value can then be negated (for
example, %177777 = -%1).
Related Programming Manual
For programming information about the NUMIN procedure, refer to the Guardian
Programmer’s Guide.