![]() ![]()
|
PUT-STRING statement
Stores the null-terminated value of a CHARACTER or LONGCHAR expression at the specified memory location. If
numbytesis specified, PUT-STRING will copy the requested number of bytes from the variable, regardless of whether there are embedded nulls. In this case PUT-STRING will not put a terminating null into the MEMPTR unless the last byte copied happens to be a null.Syntax
destination
A variable of type RAW or MEMPTR. Ifdestinationis the Unknown value (?), it remains the Unknown value (?). Ifdestinationis a MEMPTR and its region is not allocated (by a SET-SIZE statement or by a Windows dynamic link library (DLL) or UNIX shared library routine), the AVM generates a run-time error.position
An integer value greater than 0 that indicates the byte position where the AVM storesexpression. Ifpositionis less than 1, the AVM generates a run-time error.For a RAWdestination, ifpositionis greater than the length ofdestination, the AVM increases the length ofdestinationtopositionplus the remaining bytes needed to storeexpression. The gap between the originaldestinationlength andpositionis padded with null bytes.For a MEMPTRdestination, ifpositionis greater than the length ofdestinationor does not leave sufficient room to storeexpression, the AVM generates a run-time error.numbytesexpressionNotes
- For examples of how to use the PUT-STRING statement, see the PUT-BYTE statement reference entry.
- For more information on accessing DLL and UNIX shared library routines from ABL, see OpenEdge Development: Programming Interfaces.
See alsoGET-STRING function, LENGTH function, LENGTH statement, RAW function, RAW statement, SET-SIZE statement
![]() |
OpenEdge Release 10.2B
|
![]() ![]()
|