Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

Entry invocation or entry value

There are times when it might not be apparent whether an entry value itself will be used or the value returned by the entry invocation will be used. The following table and example help you understand which happens when.

If the entry reference . . . It is . . .
Is a built-in function Invoked
Has an argument list, even if null Invoked
Is referenced in a CALL statement Invoked
Has no argument list and is not referenced in a CALL statement Not Invoked

In the following example, A is invoked, B(C) passes C as an entry value, and D( C() ) invokes C.

  dcl ( A, B, C returns (fixed bin), D) entry;

  call A;                       /* A is invoked                        */
  call B(C);                    /* C is passed as an entry value       */
  call D( C() );                /* C is invoked                        */

In the following example, the first assignment is invalid because it represents an attempt to assign an entry constant to an integer. The second assignment is valid.

  dcl A fixed bin,
      B entry returns ( fixed bin );

  A = B;
  A = B();

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)