ExpressionsConstantsFunction Calls

Function Calls

< function call > -> < identifier > ( < actual list > )
| < identifier > ( )

A function call causes the invocation of the named function at run-time. The value returned by the function is used as the value of the function call expression.

As in the call statement, the number of actual parameter expressions included in a function call must match the number of formal parameters declared in the function's definition. The type of each actual parameter expression must match the type of the corresponding formal. If any of the called function's formal parameters are specified as var parameters, then the corresponding actual parameters must actually be variables as defined in section *.

A call of a function declared to return void can not be used as an expression.


Computer Science 434
Department of Computer Science
Williams College

ExpressionsConstantsFunction Calls