An actual parameter is the right hand side of an identity declaration, and consists of an unit whose context is strong. The value yielded by this unit, after strong coercion if necessary, shall be of the same mode than the one specified by the formal declarer. The value is ascribed to the defining identifier in the identity declaration.
For example, in the following identity declaration the actual
parameter is 0
, which is in a strong context, and therefore
gets widening to match the mode specified by the formal declarer
real
:
real ratio = 0;
Actual parameters also appear in routine calls, where they define the values passed to a procedure or an operator. This highlights that in Algol 68 the mechanism of associating formal parameters with actual parameters is the identity declaration: during a function call the internal values provided in the call get ascribed to the formal parameters. For example, in the following routine call:
multiply vectors ((10, 20), (1, 2));
The actual parameters are (10, 20)
and (1, 2)
, which are
row displays of some vector
mode.
Simplified [RR 4.4.1.A,d]:
A) MODINE :: MODE ; routine. d) MODE source for MODINE: where (MODINE) is (MODE), MODE source; where (MODINE) is (routine), MODE routine text.
Simplified [RR 5.2.1.1.c]:
c) MODE source: strong MODE unit.
We are not including here the rules for routine text
but these
can be found in [RR 5.4.1.a,b].