Getting text version of Enum value

Posted on 2009-02-16
Last Modified: 2013-11-23
Is it possible to get the text version of a enum value:


 myTypes = (GREEN, RED, BLUE);
 myType: myTypes;
case  myType on
   ShowMessage(convertEnumToString(myType));  //This should display GREEN

Question by:sheepfarmer
    LVL 36

    Accepted Solution

    test := GetEnumName(TypeInfo(mytypes), Integer(mytype));
    LVL 36

    Assisted Solution

    by:Geert Gruwez
    it's in unit TypInfo

    Author Comment

    Thanks very much

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
    Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
    THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
    The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now