[fpc-devel] Bit manipulation as optimization in FPC

Florian Klaempfl florian at freepascal.org
Thu Sep 7 09:08:47 CEST 2006


Jonas Maebe wrote:
> 
> On 7 sep 2006, at 08:59, Daniƫl Mantione wrote:
> 
>>> Afaik only in case of reading a boolean everything <> 0 is true (for
>>> compatibility with other languages). In case of writing, Pascal (and
>>> FPC in
>>> particular) always stores a 1 for true and 0 for false, since boolean is
>>> defined as an enum with values (false, true)
>>
>> Well, the last minute change in 2.0.4 by Florian was needed because
>> constructors return non-1 true cases, i.e.:
>>
>> if constructor_call then
>>
>> ... results actuall a pointer to the object, or nil.
> 
> Even though it's a dirty construct by Borland, it does not contradict
> what I wrote.

A constructor returns a qword/longbool which isn't defined as enumeration.



More information about the fpc-devel mailing list