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.

END<br />

Syntax<br />

END<br />

Description<br />

The <strong>UniBasic</strong> END command declares the end of a program or a block of statements.<br />

<strong>UniBasic</strong> does not require you to use END at the end of a program.<br />

Example<br />

In the following example, the END in bold type declares the end of the program<br />

segment. (The first END ELSE ends the THEN clause in the IF/THEN/ELSE<br />

statement.)<br />

A = 0<br />

PRINT "Enter a number: ":<br />

INPUT X<br />

IF X>0 THEN<br />

PRINT "Incrementing."<br />

A += 1<br />

END ELSE<br />

PRINT "Decrementing."<br />

A -= 1<br />

END<br />

PRINT A<br />

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