Is (int) a legal syntax in mql4?

is (int) a legal syntax in mql4 ? I saw people use (int) to do the same job as MathRound(), can any one explain to me about (int) ?

kind regards
seanlu

It is used when you are converting data types, specifically here you are changinging something like a double to an integer.

MQL4 will implicitly convert the data type for you and using (int) before just tells the compiler that you know about it and therefore does not produce a warning when you compile.

Since it is converting from, for example, a double to an integer which cannot accommodate a floating point, it will drop the digits after the decimal place so you are, in effect, rounding down. I probably wouldn’t do my rounding like that but I guess it works.