|
RAD Studio VCL Reference
|
Returns the integer representation of a given constant identified by it's name.
function GetSetElementValue(TypeInfo: PTypeInfo; const Name: string): Integer;
int GetSetElementValue(PTypeInfo TypeInfo, const AnsiString Name);
Use GetSetElementValue to convert a constant identified by it's symbolic name to an integer.
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 a string.
GetSetElementValue returns the integer that represents the specified value.
If TypeInfo describes an Integer type, Value is assumed to be a string representation of an integer and is converted to an integer. If TypeInfo describes a char type, an integer containing the character code is returned. If TypeInfo describes an enumerated type, GetEnumValue returns the integer representation of Value.
|
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
|
What do you think about this topic? Send feedback!
|