How do I get the string representation if I know the enum of integer value ?
type
MyEnum = (tmp_one, tmp_two, tmp_three);
const
MyTypeNames: array[tmp_one..tmp_three] of string = ('One', 'Two', 'Three');
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m assuming that you have an ordinal value rather than a variable of this enumerated type. If so then you just need to cast the ordinal to the enumerated type. Like this: