Hello BrunoK

>so a field in an object is by default initialized to tak_none during the
> object's creation. 

Hum, doing this:
_________________

PROGRAM enumtest;

type
    tabulatorkindty =
(tak_none,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') ;
end.
______________________

Gives as result:

$ enumtest

OK it is tak_none

_____________________

So, thanks for the tip, "kind" seems indeed initialized with first item.

And with your tip, one more candidate for code to choose/use to fix the bug.

Many thanks BrunoK.

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