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.

Parameter Description<br />

Reminder: The error message numbers you capture with RETURNING will vary,<br />

depending upon which version of UniData you are running.<br />

The ECL STACKCOMMON Command<br />

The ECL STACKCOMMON command makes use of common areas more flexible,<br />

although it requires additional memory. STACKCOMMON settings have the<br />

following effects:<br />

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

RTNLIST int.expr The RTNLIST clause must be an integer from 0–9, designating<br />

the select list to return to the calling program. You can use the<br />

resulting list with subsequent READNEXT statements or in the<br />

PASSLIST clause of an EXECUTE statement. If an expression<br />

is not given after RTNLIST, the generated select list replaces the<br />

contents of list 0. If RTNLIST is not specified, no list is returned.<br />

If you use EXECUTE to call a <strong>UniBasic</strong> program, no select list<br />

is returned even though you specify RTNLIST. On the other<br />

hand, PASSLIST is always effective and transfers a select list to<br />

the called program.<br />

PASSLIST int.expr The PASSLIST clause must evaluate to an integer 0, 1 or 2,<br />

designating the select list to be sent to the called program. If you<br />

do not specify int.expr, list 0 is assumed.<br />

The passed list can be the result of previous SELECT or<br />

GETLIST commands, or the result of the RTNLIST clause of a<br />

PERFORM statement.<br />

PASSCOM This parameter is provided for backward compatibility for<br />

releases before 3.1.<br />

EXECUTE Parameters (continued)<br />

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

unnamed common is passed to the executed program and back to the<br />

executing program.<br />

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

the unnamed common is not passed to the program you execute. Instead,<br />

unnamed common is saved, and the unnamed common of the called<br />

program is initialized to 0. When control is passed back to the calling<br />

program, unnamed common is restored to its value before the program call.<br />

Unnamed common is never passed to a phantom program.

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

Saved successfully!

Ooh no, something went wrong!