User Tools

Site Tools


len_return_length_of_string_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== LEN (return length of string) ====== Previous pageReturn to chapter overviewNext page

LEN(string)

blk2blue.jpg

LEN Returns length of a string.
string A string constant, variable, or expression.

The LEN procedure returns the length of a string. If the string parameter is the label of a STRING variable, the procedure will return the declared length of the variable. If the string parameter is the label of a CSTRING or PSTRING variable, the procedure will return the length of the contents of the variable. Numeric variables are automatically converted to STRING intermediate values.

Return Data Type: UNSIGNED

Example:

IF LEN(CLIP(Title) & ' ' & CLIP(First) & ' ' & CLIP(Last)) > 30 !If full name won't fit

Rpt:Name = CLIP(Title) & ' ' & SUB(First,1,1) & '. ' & Last    !use first initial

ELSE

Rpt:Name = CLIP(Title) & ' ' & CLIP(First) & ' ' & CLIP(Last)  !else use full name

END

Rpt:Title = CENTER(Cus:Name,LEN(Rpt:Title))               !Center the name in the title

len_return_length_of_string_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1