KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have declared the following enum type in which I want the first member to have the ordinal value of 1 (one) rather than the usual 0 (zero): type TMyEnum = ( meFirstValue = 1, meSecondValue, meThirdValue ); If I call TypeInfo() , e.g. as part of a call to GetEnumName() , I get a compiler error: GetEnumName(TypeInfo(TMyEnum), Ord(aValue)); ERROR: "E2134: Type 'TMyEnum' has no typeinfo" Why is this? I know that classes only have typeinfo if they are compiled with the $M compiler option enabled or (derive from some class which was, such as TPersistent ) but I didn't think there were any special conditions for having typeinfo for enum types.
Tags (comma-separated)
Save Edits
Cancel