CPR:
I have a problem with if condition and && operator.
This simple code alway give "true" as result, when must give "false". Any idea about the problem? I'm getting crazy....
Thanks in advace
You are using assignment instead of comparison operator for booleans
Change the code to this
double a=3; double b=5; bool c=true; bool d=false; if ((a<b)&&(c==true)&&(d==true)) {Alert("TRUE");} else {Alert("FALSE");}
and all will be OK

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have a problem with if condition and && operator.
This simple code alway give "true" as result, when must give "false". Any idea about the problem? I'm getting crazy....
Thanks in advace