Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Call

A call expression applies a function value to its arguments.

Process

At runtime:

  1. the callee is evaluated;
  2. the arguments are evaluated, left to right; and
  3. the callee is applied to the arguments' values, and its result is the call's value.

Assertions

  1. The callee has a function type.
  2. The number of arguments equals the number of parameters.
  3. Each argument has its parameter's type, and its expected type is the parameter's type.

A call whose callee has no runtime representation occurs at compile time.

Syntax

call_operation = left_paren, [ expression, { comma, expression } ], right_paren ;