ADELIA |
VADELIA |
SADELIA |
WADELIA |
EADELIA |
(I/B) |
(I/B) |
(B) |
(I/B) |
(B) |
Description
This predefined function is used to calculate the length of a character string.
Syntax
Result = &STRING_LENGTH(String)
Parameters
|
Description |
Contents |
Controls |
Result |
Numeric integer variable. |
Length of the character string set as a parameter. |
|
String |
Alphanumeric variable or constant. |
Character string whose number of significant characters is to be calculated. |
Mandatory parameter. |
Example
STRING = 'RIGHT FRONT SEAT '
LENGTH = &STRING_LENGTH(STRING)
*
* The LENGTH is equal to 16 (blank characters at the end are not included)
*
STRING = ' RIGHT FRONT SEAT '
LENGTH = &STRING_LENGTH(STRING)
*
* The LENGTH is equal to 18
* (blank characters at the end are not included; 2 blank characters on the left are included)
*
STRING = ' RIGHT FRONT SEAT '
STRING = &LEFT_ADJUST(STRING)
LENGTH = &STRING_LENGTH(STRING)
*
* The LENGTH is equal to 16
List of predefined functions by topic