Len

len returns the length (in number of characters) of a string, BLOB, or CLOB value.

Syntax

 len(STRING_EXPR)

Examples

 # Add spaces to a string to bring it to 25 characters# If the length is over 25 characters, the string remains unchangedIf len(MY_STRING)<25MY_STRING += space$(25_len(MY_STRING))Endif# Select the lines in a blob table where the blob are definedLocal File ABLOB [ABB]For [ABB] Where len(BLOB)<>0# In the loop, the blobs are definedNext# Let's return the value given by DEFAULT_STRING if VALUE_STRING is emptyVALUE_STRING+=string$(len(VALUE_STRING)=0,DEFAULT_STRING)

Description

len returns the length of a character string, of a CLOB or of a BLOB. The type of result is Integer.

Associated errors

Error codeDescription
10The argument is not string, CLOB, or BLOB.

See also

string$, space$, left$, right$, mid$, instr, seg$.