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.

Code Description<br />

Examples<br />

In the following example, the UniData udtlang.MSG file contains error message<br />

4432 and a user-defined file (S_ERR) contains error message E009. These messages<br />

contain the following:<br />

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

T Enters the time in internal format.<br />

W(n) Pauses for n seconds before continuing to display the message.<br />

X Skips the next parameter passed to the UniData message printing routine.<br />

PRINTERR Error Message Codes (continued)<br />

Message 4432 Message E009<br />

in udtlang.MSG in S_ERR<br />

L L(2)<br />

E FILE H => ERR<br />

A(10) S(6)<br />

H DOES NOT EXIST E<br />

L L<br />

H CAN’T PROCEED! A<br />

L H IS NOT PROPERLY SPECIFIED<br />

D L<br />

L<br />

T<br />

L<br />

The following code segment produces an error message if the file you enter for<br />

FNAME cannot be found or you enter 12 for VAR1:<br />

OPEN "S_ERR" TO E_FILE ELSE STOP "S_ERR NOT FOUND"<br />

INPUT FNAME<br />

INPUT VAR1<br />

ER1 = "4432":@FM:FNAME<br />

ER2 = "E009":@FM:"VAR1"<br />

OPEN FNAME TO TFILE ELSE<br />

PRINTERR ER1<br />

STOP<br />

END<br />

IF VAR1 > 10 THEN PRINTERR ER2 FROM E_FILE

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

Saved successfully!

Ooh no, something went wrong!