Compiler Library/XL Reference Manual (32650-90029)

3- 1
Chapter 3 Utility Procedures
This chapter describes the utility procedures EXTIN'/HPEXTIN and INEXT'/HPINEXT.
EXTIN'/HPEXTIN
This utility procedure is callable by the names EXTIN' and HPEXTIN.
NOTE EXTIN' is provided for compatibility with MPE V. In new program
development, it is advisable to call HPEXTIN for ease of use. The
declaration is the same for both utility names.
EXTIN'/HPEXTIN converts a byte array containing an input string of ASCII
digits into one of these internal representations:
* SHORTINT
* REAL
* INTEGER
* LONGREAL
See the "Comments" section for more details.
Declaration
TYPE bytearray = PACKED ARRAY [1..N] OF CHAR;
PROCEDURE HPEXTIN (
ANYVAR charstring : bytearray;
VAR stringlen : SHORTINT;
decplaces : SHORTINT;
datatype : SHORTINT;
scale : SHORTINT;
delimiters : SHORTINT;
ANYVAR result : INTEGER;
VAR error : SHORTINT
)
OPTION UNCHECKABLE_ANYVAR;
EXTERNAL;
Attributes
Parameters charstring = The byte array to be converted, passed
(Input): by reference.
stringlen = Upon entry, the field width of the
ASCII input string including all
special characters. (See Comment 1 for
more details.)
decplaces = The number of digits
d
to be
interpreted as fraction digits
(multiply the integer field by 10-d if
the input string does
not
include a
decimal point). See Comment 1 for more
details. If a decimal point is
included in the input string, this