This function accepts an enumerated value and returns the integer value associated to the enumerated value. The actual parameter passed to inpar always shall be a typed object.
type enumerated MyFirstEnumType {
Monday, Tuesday, Wednesday, Thursday, Friday
};
type enumerated MySecondEnumType {
Saturday(-3), Sunday (0), Monday
};
//within a dynamic language element:
var MyFirstEnumType vl_FirstEnum := Monday;
var MySecondEnumType vl_SecondEnum := Monday;
enum2int(vl_FirstEnum) // returns 0
enum2int(vl_SecondEnum) // returns 1
enum2int(in Enumerated_type inpar) return integer
This function accepts an enumerated value and returns the integer value associated to the enumerated value. The actual parameter passed to inpar always shall be a typed object.