| RSet Statement |
Syntax
RSet stringvar = string
stringvar
Use: Required
Data Type: String
The name of a string variable to receive string.
string
Use: Required
Data Type: String
A string expression to be copied into stringvar.
Description
Copies string into stringvar, right-aligning string within stringvar.
Rules at a Glance
RSet has meaning only when dealing within fixed-length strings.
If the length of string is less than that of stringvar, the extra characters within stringvar are padded with spaces.
If the length of string is greater than that of stringvar, string is truncated to the length of stringvar.
Programming Tips and Gotchas
RSet can't be used with user-defined types.
RSet overwrites the entire contents of stringvar. The last len(string) characters are overwritten by the value of string, while the remaining characters are replaced with spaces.
See Also
- LSet Statement
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access