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  
thank you
rod178
272
rod178  
sorasit46:
thank you

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

whroeder1
15107
whroeder1  
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  
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