[fpc-devel] BOOL
    Marco van de Voort 
    marcov at stack.nl
       
    Mon Dec 15 08:45:51 CET 2014
    
    
  
In our previous episode, Adriaan van Os said:
> Michael Van Canneyt wrote:
> >> Well, true is -1 and false 0 :) I wonder if we should forbid it in fpc 
> >> mode ...
> > 
> > We should. IMHO ByteBool is unsigned so >=0...
> 
> I suggest to change the internal value of TRUE to 1 for all boolean types, except in mode delphi. 
> Then "for b:= false to true" works as one would except.
For variant bools it is definitely -1. There is a comment about that too
somewhere.
    
    
More information about the fpc-devel
mailing list