Entry Constants

Entry constants are declared by labels or by PROCEDURE or ENTRY statements.

The leftmost label on a PROCEDURE statement is a declaration of the primary entry point of a procedure. Secondary entry points are established by the ENTRY statement. Names of external procedures that are not part of the compiled module must be declared using an ENTRY attribute and, if they are functions, a RETURNS attribute. For example:

DECLARE E ENTRY(FIXED BINARY(15), POINTER); 
DECLARE F ENTRY((5) FLOAT DECIMAL(7)) 
   RETURNS(FLOAT DECIMAL(7));

In this example, E is declared as a procedure name that requires two arguments and that must be called as a subroutine by a CALL statement. F is declared as a procedure name that must be referenced as a function. F requires an array of five Float Decimal(7) values as its arguments and returns a Float Decimal(7) result.

Procedures, other than external procedures that are not part of the compiled module, are declared by their PROCEDURE statement and cannot be declared in a DECLARE statement.

Failure to declare a referenced external procedure that is part of another program module results in error messages from the Compiler.