Help


from Wikipedia
« »  
One of Icon's key concepts is that control structures are based on the " success " or " failure " of expressions, rather than on boolean logic, as in most other programming languages.
Under this model, simple comparisons like < code > if a < b </ code > do not mean " if the operations to the right evaluate to true " as they would under most languages ; instead it means something more like " if the operations to the right succeed ".
In this case the < operator succeeds if the comparison is true, so the end result is the same.
In addition, the < operator returns its second argument if it succeeds, allowing things like < code > if a < b < c </ code >, a common type of comparison that in most languages must be written as a disjunction of two inequalities like < code > if a < b && b < c </ code >.

2.204 seconds.