bug in MQL4

 

I found a bug in mql4 language, please try the following code :


extern int GLP=25;

int start()
{
double y=GLP/100;
Print(y);
return(0);
}


it prints 0 ! it should print 0.25

tested on MT4 build 218.

Regards

 

F

Try

extern int GLP=25;

int start()
{
double y=NormalizeDouble(GLP/100, 2);
Print(y);
return(0);
}

-BB-
 
double y=GLP/100.0;
 
Reason: