Entry variables are variables, including parameters, that take entry values.
The ENTRY attribute together with the VARIABLE attribute can be used to declare variables whose values are entry values. The ENTRY attribute can be used in a RETURNS attribute to indicate that a function returns entry values. For example:
A: PROCEDURE; . . . DECLARE E ENTRY VARIABLE; . . . E = A;
In this example, E is an entry variable that is capable of being assigned any entry value. The assignment causes the value of E to become a descriptor of the procedure named A.
Any parameter attribute or RETURNS attribute specified as part of an ENTRY attribute has no effect on the values that can be assigned to the ENTRY variable. However, when the entry variable is called, the value that it currently holds must designate a PROCEDURE statement whose parameters and RETURNS option match those given in the declaration of the entry variable.
In the previous example, a program that calls E as a function or calls E with arguments is invalid and produces unpredictable results.