Ax51 User's Guide

LEN Function

The LEN MPL function returns the length of a specified character string. The character string is limited to 256 characters in length. The syntax for the LEN function is:

%LEN (balanced-text)

Source Text

%LEN (Ax51)             %' len = 4'
%LEN (Ax51,Ax51)        %' comma counts also'
%LEN ()
%LEN (ABCDEFGHIJKLMNOPQRSTUVWXYZ)
%DEFINE (TEXT) (QUEEN)
%DEFINE (LENGTH) (%LEN (%TEXT))
LENGTH OF '%TEXT' = %LENGTH.

Output Text

4
9
0
26
LENGTH OF 'QUEEN' = 5.