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.

ABORT<br />

Syntax<br />

ABORT [expr]<br />

Description<br />

The <strong>UniBasic</strong> ABORT command terminates the program or subroutine in progress,<br />

returning the user to the UniData system level. ABORT returns the user to the<br />

UniData prompt, whether the aborted program was called by another program or<br />

executed through a UniData menu or paragraph. ABORT can include an optional<br />

string expr to display when the program aborts. The expression can contain variables,<br />

functions, and/or arithmetic or string operators.<br />

The <strong>UniBasic</strong> commands ABORT and PRINTERR return the system message whose<br />

ID you specify in the command. You can also retrieve system messages using a<br />

<strong>UniBasic</strong> program by opening the system message file and reading a message record<br />

by ID.<br />

Note: ENGLISH.MSG is the default system message file that is activated when you<br />

install UniData. If you execute udtlang.config to select a language group, a different<br />

system message file could be activated. To find out which language is installed on<br />

your system, execute the ECL command SET.LANG CURRENT. For more<br />

information, see UniData International.<br />

The ABORT command in BASICTYPE P provides additional functions. ABORT<br />

prints either a user-defined message specified by the string expr, or a UniData system<br />

message identified by message-id:<br />

ABORT [message-id]<br />

ABORT [expr,...]<br />

In the first form of the syntax, the message-id must be a variable that evaluates to a<br />

key contained in the UniData message file. If no message exists, the number entered<br />

in message-id is returned. In the second form of the above syntax, you can specify<br />

more than one expr.<br />

ABORT 1-71

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

Saved successfully!

Ooh no, something went wrong!