Enum Fuctions in ax
2012
1.enum2Str
Function:
Converts the specified enumerated text to a character
representation.
Syntax: str enum2Str(enum enum)
Syntax: str enum2Str(enum enum)
Example:
The following example returns the string
" EUTrade." It is the label for the ListCode enumeration type.
ListCode
l;
;
l = ListCode::EUTrade;
info(enum2Str(l));
we can also use(enum2Value)
this below code to retrieve value of enum elements.
ListCode ls;
;
ls= ListCode::EUTrade;
info(enum2Value(ls));
Op: EUTrade
2.enumCnt
Function:
Retrieves the number of elements in the specified
enumeration type.
Syntax: int enumCnt(enum enumtype)
Example:
print enumCnt(NoYesUnchanged);//
Op: 3
or
print enumCnt(ListCode);//
Op:9
pause;
KEEP DAXING !!!
KEEP DAXING !!!
No comments:
Post a Comment