ABSTRACT
As in other programming languages, branching into if/else clauses, loops, or procedures (Sections 5.2.2-5.2.4) returns an error.
5.2.2 Conditional Branching
if statements let programs branch on conditions such as
expression1 RELATION expression2
where RELATION stands for one of the operators <, >, =, <=, >=, <> (<> means “not equal”),† as in
if Crit >= 0 then q19 = x * 1000 | else proceed
then and/or else clauses can have multiple statements:
if A21 < 0 then p = p + 1 | q = q + 50 else p = p - 1 | write ‘exception!’ proceed
Code between then and the corresponding else executes if and only if the specied condition is true. Otherwise the program continues on the far side of else. proceed statements simply let the program continue; they neatly delimit nested if clauses. ere must always be exactly one else and one proceed for each if in the script. is syntax makes our small experiment-protocol interpreter very ecient.