update: the following program output:
TRUE
OTHER
program problem;
var
B: boolean;
begin
FillChar(B, SizeOf(B), 255);
if b then WriteLn(TRUE)
else WriteLn(FALSE);
case b of
true: WriteLn(True);
false: WriteLn(False);
else WriteLn('OTHER');
end;
end.
this one tested with: Free Pascal Compiler version 1.0.10
[2003/09/01] for i386 and Free Pascal Compiler version 1.9.5
[2004/12/29] for i386
--- Jesus Reyes <[EMAIL PROTECTED]> escribi�:
> I have doubts about this so I made a small test, what I want to
> know
> is if a true boolean value be internally be represented by any
> value
> different from 0.
>
> program problem;
> var
> B: boolean;
> begin
> FillChar(B, SizeOf(B), 255);
> case b of
> true: WriteLn(True);
> false: WriteLn(False);
> else WriteLn('OTHER');
> end;
> end.
>
> I'm using : Free Pascal Compiler version 1.9.5 [2004/12/29] for
> i386
> under linux.
>
> the program output: OTHER, it's a compiler bug?
>
> _________________________________________________________
> Do You Yahoo!?
> La mejor conexi�n a internet y 25MB extra a tu correo por $100 al
> mes. http://net.yahoo.com.mx
>
> _______________________________________________
> fpc-devel maillist - [email protected]
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
_________________________________________________________
Do You Yahoo!?
La mejor conexi�n a internet y 25MB extra a tu correo por $100 al mes.
http://net.yahoo.com.mx
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel