GetEnumValueDef function
Gets the ordinal position for an enumeration value with the specified name.
Declaration
function GetEnumValueDef(TypeInfo: PTypeInfo; const Name: string;
const DefaultValue: Integer): IntegerArguments
TypeInfo | Pointer to the type information examined in the routine. |
Name | Name for the enumeration value to locate in TypeInfo. |
DefaultValue | Default ordinal position for the enumeration value used when Name is not found. |
Function result
Ordinal position for the enumeration value with the specified name.
Description
GetEnumValueDef is an
Integer function used to get the
ordinal position in the specified enumeration type insformation for the value
with the given name.
The return value contains the ordinal position in TypeInfo for the
enumeration value with the given Name. GetEnumValueDef calls
GetEnumValue to find the value in Name in the type information. If
the return value is -1, an enumeration value with the specified name
is not found in TypeInfo and the value in DefaultValue is used as
the return value.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
