NET/MASTER Network Control Language (NCL) Reference Manual
LENGTH
Built-in Functions
106126 Tandem Computers Incorporated 4–51
LENGTH The LENGTH built-in function returns the length of a specified string. Each space is
counted as one character.
LENGTH(
string
)
string
specifies the string that is measured.
Examples
The following example counts the length of the specified string. The result is 6:
&A = ABCDEF
$RESULT = LENGTH(&A)
In the following example, the result is 10:
SAY LENGTH(" ABC DEF ")
In the following example, the result is 7:
SAY LENGTH( ABC DEF )
In the previous example, NCL discards the leading and trailing spaces; then any
multiple spaces contained within the string are replaced by single spaces. This
complies with the rule for space concatenation. For more information on space
concatenation, see Section 10, ”Expressions and Operators.”