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.

Examples<br />

In the following example, the program segment assigns the string value in the<br />

primary input buffer to ARGUMENTS. If the program had been called by something<br />

other than a proc, the program prints a two-line error message.<br />

PROCREAD ARGUMENTS ELSE<br />

PRINT "ERROR!"<br />

PRINT "DIALOUT MUST BE CALLED FROM A PROC"<br />

ABORT<br />

END<br />

The following sample Proc loads the <strong>UniBasic</strong> program name proc.test into the data<br />

stack (Hproc.test), turns on that stack (STON), and loads “ONE” into the primary<br />

output buffer (HONE). The next command (P) executes the data stack entry, which<br />

runs proc.basic. Finally, D0 displays the contents of the active input buffer.<br />

The program proc.test prints after the proc, and a sample execution of the proc<br />

follows the program:<br />

PQ<br />

C<br />

C name: proc.one<br />

C test the interface of basic and PROC.<br />

C<br />

Hproc.test<br />

STON<br />

HONE<br />

P<br />

D0<br />

PROCREAD 1-584

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

Saved successfully!

Ooh no, something went wrong!