Progress
Language Reference
GET-STRING Function
Returns the null-terminated character string at the specified memory location as a CHARACTER value (not including the null terminator) or the number of bytes specified starting from the specified memory location as a CHARACTER value.
SYNTAX
source
A function or variable that returns a RAW or MEMPTR value. If source is the unknown value, GET-STRING returns the unknown value (?).
position
An integer value greater than 0 that indicates the byte position where you want to find the information. If position is greater than the length of source, Progress returns the unknown value (?). If position is less than 1, Progress generates a run-time error.
numbytes
An integer value greater than 0 that indicates how many bytes to convert into the CHARACTER value that is returned. If position plus numbytes is greater than the length of source, Progress returns the UNKNOWN value (?). If numbytes is not specified, or is -1, GET-STRING( ) returns all bytes until it encounters a NULL value.
EXAMPLESFor examples of how to use the GET-STRING function, see the GET-BYTE Function reference entry.
NOTES
- For more information on using the MEMPTR data type, see the Progress External Program Interfaces manual.
- For more information on using the RAW data type, see the Progress Programming Handbook .
SEE ALSO
LENGTH Function, PUT-STRING Statement, RAW Function (ORACLE only), RAW Statement (ORACLE only), SET-SIZE Statement
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |