Download MetaTrader 5

What function use for convert double data type to integer data type?

To add comments, please log in or register
sorasit
359
sorasit 2014.06.13 03:47 
thank you
rod178
273
rod178 2014.06.13 04:13  
sorasit46:
thank you

https://docs.mql4.com/math/mathround 

whroeder1
14741
whroeder1 2014.06.13 10:49  
sorasit46: What function use for convert double data type to integer data type?
rod178: https://docs.mql4.com/math/mathround 
  1. A cast
    double d;
    int    i = int(d); // or i = (int)d;
  2. MathRound or the others do NOT convert double to integer. They change the double value to the double equivalent of an integer, but you still have a double.
sorasit
359
sorasit 2014.06.14 01:28  
WHRoeder:
sorasit46: What function use for convert double data type to integer data type?
rod178: https://docs.mql4.com/math/mathround 
  1. A cast
  2. MathRound or the others do NOT convert double to integer. They change the double value to the double equivalent of an integer, but you still have a double.

Thank you
To add comments, please log in or register