CRE Programmer's Guide

String and Memory Block Functions
Common Run-Time Environment (CRE) Programmer’s Guide528146-004
8-7
Stcd_L
Considerations
The string to convert can contain an optional sign before the string of digits.
The Stcd_I functions do not skip leading white space.
The Stcd_I functions stop scanning if they encounter a non-decimal character or a
zero (null) byte.
Example
INT count;
STRING .s[0:7] := ["17xy",0];
INT i;
count := RTL_Stcd_I_(s, i); ! count gets 2, i gets 17
Stcd_L
The Stcd_L functions convert a string of decimal characters to a 32-bit integer. These
functions are not available in the native CRE library.
str
is a pointer to the string to convert.
longint
is a pointer to the resulting 32-bit integer.
Return Value
The Stcd_L functions return the number of characters scanned.
Considerations
str can contain an optional sign followed by a string of digits.
The Stcd_L functions do not skip leading white space.
The Stcd_L functions stop scanning if they encounter a non-decimal character or a
zero (null) byte.
INT PROC RTL_Stcd_L_( str, longint );
STRING .str; ! in
INT(32) .longint; ! out TNS only
INT PROC RTL_Stcd_LX_( str, longint );
STRING .EXT str; ! in
INT(32) .EXT longint; ! out TNS only