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.

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

If STACKCOMMON is off when one program executes another, the<br />

contents of unnamed common areas are passed to the executed program and<br />

back to the executing program.<br />

If STACKCOMMON is on when one program executes another program,<br />

the contents of unnamed common areas are not passed to the program you<br />

execute. Instead, they are saved, and the called program’s unnamed<br />

common areas are initialized to 0. When control is passed back to the calling<br />

program, it is restored to its value before the program call. Unnamed<br />

common areas are never passed to a phantom program.<br />

Parameters<br />

The following table describes each parameter of the syntax.<br />

Parameter Description<br />

/common.name/ Specifies a name for a named common variable. common.name can<br />

have any valid variable name no longer than seven characters. Default<br />

(no common name provided) stores the variable in unnamed common.<br />

var1 A variable to place in the named or unnamed common.<br />

,var2 A second variable to place in the named or unnamed common areas.<br />

ARR1 An array to place in the named or unnamed common area. Do not<br />

declare common arrays with a DIM statement. Arrays in a common<br />

cannot be dynamically redimensioned.<br />

, You can enter a COMMON statement on several lines by terminating<br />

each line to be continued with a comma.<br />

COMMON Parameters<br />

Examples<br />

In the following example, the COMMON statement declares the arrays NAME and<br />

DATES, and declares the variable DCHANGE in unnamed common:<br />

COMMON NAME(100),DATES(100,2),DCHANGE

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

Saved successfully!

Ooh no, something went wrong!