>Note that if you depend on this technique you should add a comment where the type is defined that the order of the items is > significant so that someone in the future does not change the order out of > ignorance!
Yes, that is the main problem. If you do it the "logical" way, placing at first without initialization, when ord(kind) is used in code, because the order has changed, lot of code must be re-written. But if you place it at last you only have to initialize at creation with nk_none and replace all use of "high(enumty)" by the last - 1 item of the enum. 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