A possibility, using your enumeration is to change it from

tabulatorkindty = (tak_left,tak_right,tak_centered,tak_decimal,
tak_none);

to

tabulatorkindty = (tak_none,tak_left,tak_right,tak_centered,tak_decimal);

so a field in an object is by default initialized to tak_none during the object's creation. (I generally define mynenum_undef orĀ  mynenum_unknown as first item in an enum). This way there is no need to do an unnecessary transtyping. Enum items are represented by an unsigned 0 based CARDINAL. (AFAIK)

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to