Boolean Double Comparison

From RemObjects Software

Jump to: navigation, search

This is a Oxygene Language Feature topic
Feel free to add your notes to this topic below.



A minor but a very handy feature, comparison operators now can be used for expressions such as:

if 5 < y < 10 then ...

to test if y is between 5 and 10. This is more than just syntactic sugar as Boolean short-circuits apply and there is only a single variable to evaluate. Compare this with

if (5 < y) and (y < 10) then ...

where y would be evaluated twice if it is not less than 5 (imagine y being a property or a complex method).


See Also


Product: RemObjects Oxygene (formerly known as Chrome)
Current version: 3.0 Previous Versions: 'Joyride' (2.0), 'Floorshow' (1.5), 'Adrenochrome' (1.0)

GlossaryKeywordsLanguage FeaturesPlatform FeaturesSamplesArticlesHow ToIssues

Personal tools