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.

In the next example, the program segment converts all occurrences of AC to X, which<br />

sets NSTRING equal to XBDEFG (notice that C is deleted):<br />

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

NSTRING = "ABCDEFG"<br />

CONVERT "AC" TO "X" IN NSTRING<br />

In the following example, the replacement string of “F,G” is longer than the string it<br />

is intended to replace, so the extra characters, “,G”, are ignored. After the conversion,<br />

NSTRING equals F,C,D,E.<br />

NSTRING = "A,C,D,E"<br />

CONVERT "A" TO "F,G" IN NSTRING<br />

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

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

CONVERT function, SWAP

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

Saved successfully!

Ooh no, something went wrong!