name [(expression {[,] expression})] qualified-name [(expression {[,] expression})]
Calling a procedure opens a new name space and assigns the values of the expressions to the parameter names listed in the procedure definition. The details are similar to those of a multiple target assignment.
When the parameter names have been assigned their values, the sequence of instructions constituting the procedure body is carried out. When a return instruction is encountered, the name space is closed and the instruction following the procedure call is carried out. Reaching the end of the procedure body is equivalent to encountering a return instruction.
While a procedure is being carried out, names not defined in the procedure body refer to definitions established by, or imported into, the module in which the procedure has been defined. In other words, static scoping applies.
Procedures defined in the same module as the procedure call instruction, can be called before their defining instruction has been reached (see example). This causes complications when abstract type variables are used to type procedure parameters or procedure variables, since these variables need to be defined before the procedure can be called. (See also: Type checking.)