This article is from the FAQ, by with numerous contributions by others.
Leave and restart are the very basic local control mechanisms in BETA. Leave
and restart are specified by:
restart id
and
leave id
P: A(# ...
do (* L1 *)
...;
leave/restart P;
...;
(* L2 *)
#)
(# A: (#
do (for 4 repeat '['->put; INNER; ']'->put for)
#);
P: A (# k: @integer
do k+1->k->putInt;
(if k=2 then '-'->put; leave P if);
(if k=3 then '*'->put; restart P if);
'+'->put
#);
do P
#)
[1+][2-][3*4+][5+]
 
Continue to: