7.3. Procedure Statements

A procedure identifier, followed in parentheses by a list of actual parameters (if any), is known generally as a procedure call. If the procedure possesses a value, it may be used as a primary in an expression, but whether it possesses a value or not, it may also stand alone as a statement. This causes

  1. the formal parameters in the procedure declaration to be replaced by the actuals in a manner which depends on the formal parameter specifications (see Section 8.3).

  2. the procedure body to be executed before the statement dynamically following the procedure statement is obeyed.

The syntax for a procedure call is

Procedurecall ::= 
    Id
     Id (  Actuallist ) 

Actuallist ::= 
     Actual
     Actual ,  Actuallist 

Actual ::= 
     Expression
     Wordreference
     Destination
     Name 

Name ::= 
     Id 

The purposes of the four types of actual parameter are defined in Section 8.3.