Name foreach
Definition foreach (v:var(T:type)) in (A:val(T^(n:val(int)))) do (e:expr(void)) : expr(void)
Example foreach v in A do (t:=t+v)
Defined in ctrl.l
Implementation lard
Infix foreach_in_do_ : infix(60,none).
Description For each element of array A in turn, set v to equal that element and evaluate the body expression.
Note Note that the value is copied into v before the body is evaluated; changes to v do not change A (and indeed A need not be a variable).