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
Just met a bunch of people who think that the compiler zeroes in on local variables just like it does on global variables.
And the compiler doesn't give out varnings.
It does, string and print are no indicator of working with variables
'tst.mq5' tst.mq5 1 1
possible use of uninitialized variable 'c' tst.mq5 16 10
possible use of uninitialized variable 'e' tst.mq5 20 17
code generated 1 1
0 error(s), 2 warning(s), 526 msec elapsed 1 3
time = 1018
sum = 894782460
time = 371
sum = 894782460
I don't know why, but μl overtakes strongly (and the more intricate rand() variants).
And for me it's obvious - take it out of the loop.
Just met a bunch of people who think that the compiler zeroes in on local variables just like it does on global variables.
And the compiler doesn't give out any warrants.
Or .... I don't know. I get it to swear at every chance I get.... ))))))
Or .... I don't know. I swear like that every chance I get.... ))))))
time = 1018
sum = 894782460
time = 371
sum = 894782460
I don't know why, but μl is way ahead of the curve (and the more intricate rand() variants).
And for me it's obvious - take it out of the loop.
I'm no guru, but here, in my humble opinion, declaring variables in a loop is a HUGE deal (and it's no longer a HUGE deal) !!!
One thing is a function, even a local piece of code, but loops....
I may be wrong ))))))))
You have an obscene version of the compiler)
And I'm happy about that ))))))))))) Although sometimes .... I'd rather he didn't say anything )))))))))))))))))))))))))))))))
If this is a debate - I want to ask the Guru.
Which is "correct" (optimal and readable):
Or
If the order of i is indifferent?
I'm no guru, but here, in my humble opinion, declaring variables in a loop is a HUGE deal (and it's no longer a HUGE deal) !!!
One thing is a function, even a local piece of code, but loops....
I may be wrong ))))))))
If this is a debate - I want to ask the Guru.
Which is "correct" (optimal and readable):
Or
If the order of i is indifferent?
I think the first option, because there is no extra variables, they not only use memory, but for me, clutter the code - read more, but it depends on the functions you call imho, if the function is rarely used, then sometimes it will be more readable, if you declare a variable with a name in the sense of the task.... all in all, this is a creative problem ))))
but generally, don't listen to them, write as you like - use the language for your own convenience
SZZ: look at examples from mikrosoft, the style mostly - declarations at once when using variables, basically get local scope, but without fanaticism ))
https://github.com/microsoftIf this is a debate - I want to ask the Guru.
Which is "correct" (optimal and readable):
Or
If the order of i is indifferent?
If indifferent then.
int i = Bars();
while(i-- > 0)
{
// code
}
.