From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function GetSetElementName(TypeInfo: PTypeInfo; Value: Integer): string;


extern DELPHI_PACKAGE System::UnicodeString __fastcall GetSetElementName(PTypeInfo TypeInfo, int Value);


Type Visibility Source Unit Parent
function public
System.TypInfo System.TypInfo


Returns the string representation of a given constant.

Use GetSetElementName to convert a constant into the symbolic name that represents it in code.

TypeInfo is the type information record that describes the type for which the constant has a meaning. You can obtain the type information for a type by calling the TypeInfo function in Object Pascal or the __delphirtti operator in C++.

Value is the constant, represented as an integer.

GetSetElementName returns the string that represents the specified value.

If TypeInfo describes an Integer type, Value is assumed to be a simple integer and is converted to its numerical string representation. If TypeInfo describes a char type, a string containing the Pascal character notation of Value is returned. If TypeInfo describes an enumerated type, GetEnumName returns the string representation of Value.

See Also