
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
In my programs, if there are many ifs, I use this construction, with the conditions that will most often give false in the first place:
And if I need to check a lot of if-ops, I use this way:No, it doesn't work that way. First, there must be something after if(), at least just a semicolon (i.e. an empty operator) . Second, which one of the if's is your else operator meant to belong to? If it refers only to the last one (as you wrote it), then Action will be executed only if the D condition is true provided that A,B and C are false. It is always advisable to place curly braces to see the logic clearly.
If my highlighting is possible, then it's a good idea to do it this way:
How? Possible? -------------------------- I checked it in code, the compiler gives a warning;
';' - semicolon unexpected C:\Program Files\
If it works, can we put up with the warning too?!
If the one I have highlighted is possible, then it would be a good idea to make it so:
How? Possible? -------------------------- Checked in the code, the compiler gives a warning;
';' - semicolon unexpected C:\Program Files\
If it works, can we put up with the warning too?!
Thank you very much! How easy it is!
However, I had to put this block at the end of the start, because return(0) didn't let anything else work after it.
Has anyone measured the speed at all? )))
I'll take a measurement!
I finally measured it! It's 17.26! That's 10 minutes longer than the best if() with no tricks in six months in the tester. Sorry, but it can't be helped! I'll keep digging! Thanks to all! But it's too early to sum it up yet!
If the one I have highlighted is possible, then it would be a good idea to make it so:
How? Possible? -------------------------- Checked in the code, the compiler gives a warning;
';' - semicolon unexpected C:\Program Files\
If it works, can we put up with the warning too?!
A warning is given in case someone just put a comma in the wrong place(the empty ';' operator is not often used). This construction works and is perfectly legal.
I'll take a measure!
But you have to check all the options. Otherwise you could be wrong.
If the one I have highlighted is possible, then it would be a good idea to make it so:
How? Possible? -------------------------- Checked in the code, the compiler gives a warning;
';' - semicolon unexpected C:\Program Files\
If it works, can we put up with the warning as well?!
To make the warnings less annoying, use: {}
To keep warnings from cluttering up your eyes, use {}: {}