|
|
|
|
|
EnumerationFromValue (Function) In french: EnumérationDepuisValeur Returns an enumeration value known by its associated value. // Describe the enumeration AnEnumeration is Enumération Value1 = "A" Value2 = "B" END  MyEnumeration is Enumération  // "Value1" is assigned to MyEnumeration MyEnumeration = EnumerationFromValue(AnEnumeration, "A") // The trace shows Value1 -> "A" Trace(MyEnumeration..Name + " -> " + MyEnumeration..Value)  // "Value2" is assigned to MyEnumeration MyEnumeration = EnumerationFromValue(AnEnumeration, "B") // The trace shows Value2 -> "B" Trace(MyEnumeration..Name + " -> " + MyEnumeration..Value)
Syntax
<Result> = EnumerationFromValue(<Enumeration> , <Value> [, <Default>])
<Result>: Enumeration variable Enumeration variable. <Enumeration>: Enumeration variable Name of the Enumeration variable to be used. <Value>: Variant Simple value (string, integer, real, boolean, ...) of the enumeration. <Default>: Optional variable Default value that must be given to the enumeration if the <Value> is not found. If this parameter is not specified and the <Value> is not found, a fatal error (exception) is generated.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|