The LIMITED attribute indicates that the entry variable has only non-nested entry constants as values. A entry variable that is not LIMITED can have any entry constants as values.
|
Example: proc options(reorder reentrant);
dcl (Read, Write) entry;
dcl FuncRtn(2) entry limited
static init (Read, Write);
dcl (Prt1) entry;
dcl PrtRtn(2) entry variable limited
static init (Prt1, /* legal */
Prt2); /* illegal */
Prt2: proc;
·
·
·
end Prt2;
end Example;
A LIMITED static entry variable can be initialized with the value of a non-nested entry constant, thus allowing generation of more efficient code. It also uses less storage than a non-LIMITED entry variable.