> And it's not initialized with the first item, but with 0. Well said, indeed, that example (see tak_none := 1):
PROGRAM enumtest; type tabulatorkindty = (tak_none := 1,tak_left,tak_right,tak_centered,tak_decimal); var kind: tabulatorkindty; begin if kind = tak_none then WriteLn('OK it is tak_none') else WriteLn('No is is not tak_none') ; if kind = tabulatorkindty(0) then WriteLn('OK it is 0') else WriteLn('No is is not 0') ; end. ___________ Gives as result: $ /home/fred/enumtest > No it is not tak_none > OK it is 0 And, cherry on the cake, now at compilation, there is that warning: > Compiling /home/fred/weird/enumtest.pas > enumtest.pas(10,8) Warning: Variable "kind" does not seem to be > initialized Hum, I feel to become a enum-guru. Thanks Sven! 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