11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CASE<br />

Syntax<br />

BEGIN CASE<br />

CASE expression1<br />

statements1<br />

[ CASE expression2<br />

statements2]<br />

.<br />

. .<br />

. .<br />

[ CASE 1<br />

statements]<br />

END CASE<br />

Description<br />

The <strong>UniBasic</strong> CASE command creates a series of branches based on conditional<br />

expressions. Case structures must always begin with BEGIN CASE and terminate<br />

with END CASE.<br />

The number of CASE commands within BEGIN CASE and END CASE is unlimited.<br />

The number of statements within each CASE branch is unlimited. CASE statements<br />

can be nested.<br />

The CASE command tests each of the expressions in sequence. If an expression<br />

evaluates as true, the system executes the statements that follow it. When one of the<br />

CASE expressions is found to be true, the system does not test any subsequent<br />

expressions. If none of the conditions is true, the system does not execute any<br />

statements.<br />

With null value handling turned on, a test of the null value returns a negative result.<br />

For an overview of how the null value affects <strong>UniBasic</strong>, see Developing <strong>UniBasic</strong><br />

Applications.<br />

1-125 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!