[fpc-devel] compiler bug?
Nico Aragón
na-list at espira.net
Sat Jan 1 11:56:52 CET 2005
El Sábado, 1 de Enero de 2005 09:06, Jose Manuel escribiste:
> So i think. I think Ord(TRUE), Succ(FALSE), etc. are valid Standard and
> Extended Pascal expressions, as well as the behaviour of a declarion of
As far as I know:
Ord(True) > Ord(False) = True
Succ(False) = True
...are not only legal but also mandatory in the standard. But that doesn't
mean anything. You can implement Ord and Succ to return that values for
booleans no matter how you implemented the type.
> type TBoolArray = array[boolean] of ... is neatly defined in the very
> language. (At least in Modula-2, that enumeration is part of the standard,
> so it's a language feature and not compiler implementation dependant).
It's possible to implement the boolean type as an enumeration and still
implement the boolean evaluation as "<> 0". I'm pretty sure to have seen this
in some specification, I just can't remember in which right now :-)
--
saludos,
Nico Aragón
http://espira.net/nico/
More information about the fpc-devel
mailing list