CRE Programmer's Guide

String and Memory Block Functions
Common Run-Time Environment (CRE) Programmer’s Guide528146-004
8-13
Stpblk
integer
is the integer to convert.
max_bytes
is the number of bytes allocated at str for the conversion.
Return Value
The Stcu_D functions return the length of the resulting string, excluding the terminating
null character.
Considerations
The Stcu_D functions do not produce leading zeros in the output string.
If integer is negative, the output string is preceded by a minus sign.
str is terminated with a null byte.
If integer is zero, a single zero character is produced.
The buffer at str must be large enough to hold the converted number and a null
byte. If there are more than
max_bytes minus one digits in the converted number,
the Stcu_D functions store
max_bytes minus one digits and a null character. The
digits stored are the least significant digits of the converted integer.
Example
INT count;
STRING .s[0:7];
INT i := %100002;
! count gets 5, s gets ["32770",0]
count := RTL_Stcu_D_(s, i, 8);
Stpblk
The Stpblk functions scan a string for a non-white-space character. These functions
are not available in the native CRE library.
str
is a pointer to the string to scan.
INT PROC RTL_Stpblk_( str );
STRING .str; ! in TNS only
INT(32) PROC RTL_StpblkX_( str );
STRING .EXT str; ! in TNS only