Go backward to
Parameter Substitution
Go up to
Top
Go forward to
Declaration and Variable Parameters
Numeral and Command Parameters
Example:
const
K
=2;
var
A
;
newint
;
proc
P
(
M
:
comm
) =
A
:=
K
+1;
M
;
proc
Q
(
X
:
int
) =
A
:=
X
in call
P
(
call
Q
(2));
call
P
(
call
P
(
call
Q
(
K
)));
call
P
(
A
:=
K
)
Command parameters evaluated lazily.
Eagerly evaluated command parameters:
Argument defines
backtracking point
.
[[
pi
|-
call
I(C):
comm
e
s
=
p
([[
pi
|- C:
comm
]]
e
s
)
s
where (I=
p
) in
e
var
A
;
newint
;
proc
P
(
M
:
comm
) =
...
if
error
then
M
else
...
fi
in
...
call
P
(
A
:=0)
Reference of
M
extracts old store!
Author:
Wolfgang Schreiner
Last Modification: May 7, 1998