CRE Programmer's Guide

String and Memory Block Functions
Common Run-Time Environment (CRE) Programmer’s Guide528146-004
8-6
Stcd_I
max_bytes
specifies the maximum number of bytes to copy. max_bytes must be a positive
number.
Return Value
The Stccpy functions return the number of characters copied from source to dest.
Considerations
source must be terminated by a zero (null) byte to stop the scan.
The Stccpy functions terminate dest with a null byte, independent of whether the
maximum count or a null byte in
source stopped the copy operation.
Example
INT i;
STRING .des[0:7];
STRING .src[0:20] := ["abc",0,"def"];
i := RTL_Stccpy_(des, src, 8); ! i gets 3, des gets["abc",0]
Stcd_I
The Stcd_I functions convert a string of decimal characters to a 16-bit integer. These
functions are not available in the native CRE library.
str
is a pointer to the string to convert.
integer
is a pointer to the resulting integer.
Return Value
The Stcd_I functions return the number of characters scanned.
INT PROC RTL_Stcd_I_( str, integer );
STRING .str; ! in
INT .integer; ! out TNS only
INT PROC RTL_Stcd_IX_( str, integer );
STRING .EXT str; ! in
INT .EXT integer; ! out TNS only