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.

ENTER<br />

Syntax<br />

ENTER filename<br />

ENTER @variable<br />

Description<br />

The <strong>UniBasic</strong> ENTER command passes control to the program you specify. It terminates<br />

the program that is passing control and executes the cataloged program. The<br />

ENTER command allows variables to pass through common areas, but all other<br />

variables are reinitialized when the new program begins.<br />

Note: This command does not return control to the original program by default. For<br />

structured programming, use GOSUB and RETURN. This makes the program easier<br />

to read and maintain.<br />

The ENTER command processes faster than the CHAIN command.<br />

Examples<br />

In the following example, the program statement transfers control to cataloged<br />

program CHECK_1:<br />

ENTER CHECK_1<br />

In the next example, the program segment transfers control to cataloged program<br />

CHECK_2:<br />

NO = 2<br />

PROG = "CHECK_":NO<br />

ENTER @PROG<br />

ENTER 1-257

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

Saved successfully!

Ooh no, something went wrong!