[Overview][Constants][Types][Classes][Procedures and functions] |
Get ordinal value for enumerated type by name
Source position: typinfo.pp line 276
function GetEnumValue( |
TypeInfo: PTypeInfo; |
const Name: String |
):Integer; |
GetEnumValuescans the type information for the enumeration type described by TypeInfoand returns the ordinal value for the element in the enumerated type that has identifier Name. The identifier is searched in a case-insensitive manner.
This can be used to set the value of enumerated properties from a stream.
For an example, see GetEnumName.
If Nameis not found in the list of enumerated values, then -1 is returned. No check is done whether TypeInfopoints to the type information for an enumerated type.
|
Return name of enumeration constant. |
|
|
Set value of an ordinal property |