Keil Logo

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.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.