Сообщение от
Blog bot
In this case, however, it issues a warning message, lest this is not what the user wanted.
One solution is to use the anytype type to hold the vaue for conversion and then using the any2int function, as shown below:
X++:
real r = 3.13;
int i = r; // Warning is issued here
anytype a;
a = r; // Assign to an anytype variable...
i = any2int(a); // ... and back into an int
This should be packaged into a function, maybe called int RealToInt(real arg).