any2Real Function
Dynamics AX 2009
Converts an anytype value to a real value.
real any2Real(anytype object)
static void any2RealExample(Args _args)
{
real myReal;
str s;
int i;
NoYes a;
;
s = "5.12";
myReal = any2Real(s);
Global::info(strfmt("%1 is the output from the input of 5.12 as a str object", myReal));
i = 64;
myReal = any2Real(i);
Global::info(strfmt("%1 is the output from the input of 64 as an int object", myReal));
a = NoYes::Yes;
myReal = any2Real(a);
Global::info(strfmt("%1 is the output from the input of NoYes::Yes as an enum object", myReal));
}
/****Infolog display.
Message (02:43:57 pm)
5.12 is the output from the input of 5.12 as a str object
64.00 is the output from the input of 64 as an int object
1.00 is the output from the input of NoYes::Yes as an enum object
****/
Community Additions
ADD
Show: