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.

COMMON<br />

Syntax<br />

COMMON [/common.name/] var1 [,var2][ARR1]...[,]<br />

Synonym<br />

COM<br />

Description<br />

The <strong>UniBasic</strong> COMMON command stores variables that can be accessed from any<br />

subroutine or program. You can declare one unnamed common area and multiple<br />

named common areas. The number of variables that a common area can contain<br />

depends on the virtual memory of your system. For information about virtual<br />

memory, see Administering UniData on UNIX or Administering UniData on<br />

Windows Platforms.<br />

Constraints and Considerations<br />

Keep the following points in mind when writing programs that use common to pass<br />

variables:<br />

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

Common variables are not passed when you execute CHAIN to another<br />

<strong>UniBasic</strong> program.<br />

Unnamed common is removed when you return to the ECL prompt, but<br />

named common remains in memory until deleted with the ECL DELETE-<br />

COMMON command, even if the program aborts.<br />

COMMON must be the first noncomment statement in the called program.<br />

CLEARCOMMON sets the common variable to 0. DELETECOMMON<br />

removes common variables.

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

Saved successfully!

Ooh no, something went wrong!