They are not the same.
-
A && B && C >= 10
Means A is true and B is true and C >= 10
-
True = non-zero and false = zero so you get:
if( 3 < 2 < 1 ) if( false < 1 ) if( 0 < 1 ) if( true )
if( 3 > 2 > 1 ) if( true > 1 ) if( 1 > 1 ) if( false )
William Roeder:
They are not the same.
They are not the same.
-
Means A is true and B is true and C >= 10
-
True = non-zero and false = zero so you get:
Hi William!,
Good to know thanks for your reply.
Is there a shortcode to do the same way ?, but shorter.
A>=10 && b>=10 && c>=10
MathMin( A, MathMin(b,c) ) >=10Less efficient, less clear; you decided if it is shorter.
fdesu:
if ((A+b+c)>=30)
Hi William!,
Good to know thanks for your reply.
Is there a shortcode to do the same way ?, but shorter.
Nevermind guys thanks for your time!!, i think is alright.
Regards!
fdesu:
A>=10 && b>=10 && c>=10
Is there a shortcode to do the same way ?, but shorter.
Sardion Maranatha:
if ((A+b+c)>=30)
if ((A+b+c)>=30)
Wrong.
What if a = 30, b=1 and c=1 ?
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
Hello Everyone!,
I have a question about a syntax
A && B && C >= 10
is the same like this?
I know is a newbie question, but i didn't find some information about it or some examples, i did some runnings but is not clearly.
Thanks in advance and sorry for it :( .
Regards