Philippe, You are are quite correct in seeing a problem with "ord(high(set))+1". On a related topic, that I have never seen discussed here, is the problem of using other people's definition of enumerated types in const statements like ...
const FieldTypeNames: array [TFieldType] of string[4] = ('Unk', 'A', .... ,'Guid');
I have twice created a maintenance problem with the above kind of code, which occured when Borland extended the types. That problem could have been avoided by "subtyping" the TFieldType like in the following ...
type TFieldTypeX = (ftUnknown .. ftGuid); const FieldTypeNames: array [TFieldTypeX] of string[3] = ('Unk', 'A', .... ,'Guid');
But what is a good way to minimize the effect of adding a member in the middle of the range?
Thanks for pointing out my error, John H