11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

LEN<br />

Syntax<br />

LEN(str.expr)<br />

Description<br />

The <strong>UniBasic</strong> LEN function returns the length of character expression str.expr. LEN<br />

supports multibyte languages.<br />

With null value handling on, the null value has a length of one byte.<br />

Examples<br />

In the following example, the program segment displays 14, the length of the string<br />

NAME:<br />

NAME = "Arthur Fiedler"<br />

PRINT LEN(NAME)<br />

The following figure illustrates a string that indicates below each “character” the<br />

number of bytes required to store that character. The string contains eight bytes.<br />

Therefore, LEN would return 8 for this string.<br />

Number<br />

of bytes<br />

1-410 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

2 3 1 2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!