right, it's like:
if (Variable1 == Variable2 && Variable3 == Variable4) { bool CriteraMet = true; } if (VariableA == VariableB && VariableC == VariableD) { bool CriteraMet = true; }
Thanks for your reply.
Does that mean that my sample code produce a different result compared to yours? If so: Can you please tell me why?
no, i said it's the same thing if you write like that
Oh - Sorry. My mistake.
Misread you post. Thought you said "Right is like..."
Oh - Sorry. My mistake.
Misread you post. Thought you said "Right is like..."
that's y i put a comma usually i'm writing here without punctuation
Yeah. I see what you mean...
I have something else which I would like clarification. Added a >
Sample:
if (Variable1 == Variable2 && Variable3 == Variable4 || VariableA == VariableB && VariableC == VariableD > VariableX) { bool CriteraMet = true; }
As far I my understanding was/is does this code basically mean that "CriteriaMet" will be true if:
The left of my or(||) is true
OR
The right is true if A=B&C=D and both (ABCD) are > than X.
Is this right or is this code handled different?
wrong code
It depends on what the variable contains
(what u r trying to acomplish & what is wrong with 2 if's or more)
I want to execute an oder delete if certain criterias are met.
I mean: I could write it like this - and there is nothing wrong with it, I guess...?
if (Variable1 == Variable2 && Variable3 == Variable4) { bool CriteraMet = true; } if (VariableA == VariableB && VariableC == VariableD > VariableX) { bool CriteraMet = true; }
Still the second if should mean the following:
The right is true if A=B&C=D and both (ABCD) are > than X.
I just thought it would look more clean if I only use one "if".
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello folks,
might be a silly question for most of you, but I'm just running in a problem and would appreciate some clarification.
Sample:
As far I my understanding was/is does this code basically mean that "CriteriaMet" will be true if either the left of my or(||) or the right is true. Is this right or is this code handled different?
Thanks.
WorstCases