> which will make it always true. I see no reason for that "if" to exists
> at least not with out the code. 

Yes I know, it is strange.

But, like explained Roland Chastain in a other topic:

> With FPC 3.0.4, the following code compiles without warning and works:

>type
>  tabulatorkindty = (ak_left, tak_right, tak_centered, tak_decimal);
 
> var
>  kind: tabulatorkindty;
   
> begin
>  kind := tabulatorkindty(-1);
>  if kind = tabulatorkindty(-1) then
>    WriteLn('hello');
> end. 

fpc <= 3.0.4 accept it, without any warnings.

It is fpc 3.2.0 that reveals it and gives warnings ( and that can be
considered, imho, as a bug).

Fre;D






-----
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to