|
RAD Studio VCL Reference
|
Returns the string representation of a given constant.
function GetSetElementName(TypeInfo: PTypeInfo; Value: Integer): string;
AnsiString GetSetElementName(PTypeInfo TypeInfo, int Value);
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 Delphi 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.
|
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
|
What do you think about this topic? Send feedback!
|