[fpc-devel] compiler bug?

peter green plugwash at bircd.org
Fri Dec 31 23:39:08 CET 2004


Different languages approach boolean operations in different ways.

1: the C way
  false=0 true=anything else seperate logical and bitwise operators.
2: the BASIC way (also used by the access database)
  false=0 true=-1 logical and bitwise operations therefore equivilent
(though it should be noted that vbs if statement accepts anything nonzero as
true)
3: the PASCAL way
  boolean is a totally seperate type from integer types so the compiler
knows whether you mean logial or bitwise operations. I don't know if false
and true having ordinal values of 0 and 1 is part of a standard or a
borlandism but im pretty sure its what all pascal compilers anyone cares
about do.






More information about the fpc-devel mailing list