[fpc-devel] BOOL

Mark Morgan Lloyd markMLl.fpc-devel at telemetry.co.uk
Mon Dec 15 10:35:12 CET 2014


Mark Morgan Lloyd wrote:

> I agree that zero and false are generally equivalent, except possibly in 
> the case of unix shell scripts where it gets messy. It's arguably unsafe 
> to ever cast true to a number or enumeration, and possibly the best 
> behaviour would be to ensure that the compiler always handled  for b := 
> false to not false do  and for b := not false to false do  the same.

Should obviously have read  b := not false to true do  Need more 
caffeine. The salient point is that both give you full coverage of an 
enumerated type, so it's reasonable to expect every value to be iterated 
although the order might be undefined.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-devel mailing list