Jump to content

Icon+Unicon/Intro: Difference between revisions

m
Line 245:
x := arglist[i] # Succeeds assigning x the value of arglist[i] or fails (leaving x unchanged) if i is out of bounds.
write(x)</lang>
 
The value of x will not be replaced if ftn() issues the ''fail'' command. If ftn fails, then Goal-Directed Evaluation will also fail the assignment, therefore x is not assigned a new value. If the flow of control through a procedure falls off the end, the procedure implicitly fails.
 
====suspend expr====
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.