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.

DISPLAYWIDTH<br />

Syntax<br />

DISPLAYWIDTH (string)<br />

Description<br />

The <strong>UniBasic</strong> DISPLAYWIDTH function returns the number of bytes needed to<br />

display a string expression. For instance, the display width of English characters is<br />

one. In languages that use multibyte characters, the display width of a character can<br />

be 1, 2, 3, or 4 bytes, depending on the language and the character.<br />

Example<br />

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

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

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

Number<br />

of bytes<br />

Related <strong>Commands</strong><br />

<strong>UniBasic</strong><br />

BYTELEN, CHARLEN, ISMB, LEN, MBLEN<br />

1-219 <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!