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 INPUT statement with the -1 parameter checks the typeahead<br />

buffer. If S.FLAG is 0, the buffer is empty. If it is 1, the buffer contains data.<br />

In the latter case, UniData prints the current value of RECS.PROCESSED.<br />

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

INPUT S.FLAG,-1<br />

IF S.FLAG THEN PRINT RECS.PROCESSED<br />

In the next example, the user has 30 seconds to input data. Otherwise, the program<br />

prints “No input within 30 seconds”.<br />

INPUT ANSWER FOR 30<br />

ELSE PRINT "No input within 30 seconds"<br />

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

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

CLEARINPUT, DATA, IN, INPUT @, INPUTERR, INPUTIF, INPUTNULL,<br />

INPUTTRAP, PROMPT, SYSTEM

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

Saved successfully!

Ooh no, something went wrong!