Icon+Unicon/Intro: Difference between revisions

Content added Content deleted
Line 188: Line 188:
Expression failure is a signal that cannot be ignored and is used to control program flow whether with operators, control structures, or procedures. Failure effectively short circuits the evaluation of the expression and forces processing into an alternate path if any exists.
Expression failure is a signal that cannot be ignored and is used to control program flow whether with operators, control structures, or procedures. Failure effectively short circuits the evaluation of the expression and forces processing into an alternate path if any exists.


This differs from the approach of many traditional procedural languages in which comparison operators return a true/false value. It also means that your comparison expression will be force you onto the correct logic path.
This differs from the approach of many traditional procedural languages in which comparison operators return a true/false value. No value is associated with failure. It also means that evaluation of an expression will be force you onto the correct logic path.


=== Everything Returns a Value Except when it Doesn't ===
=== Everything Returns a Value Except when it Doesn't ===