Errors, bugs, questions - page 2009

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
Why no Warnings at all, that the variable is not used?
Because it is initialised.
Because it is initialized.
So what difference does it make? It's initialised with a constant. Even this code should generate Warning
Because the variable and the array are not involved anywhere.
So what difference does it make? It's initialised with a constant. Even this code should generate Warning
Because the variable and the array don't participate anywhere.
I think such code must not compile at all because the array size is not defined. But it's just a nitpick.
Well, how come they don't take part? A variable is assigned an array cell value. This is what they take part in calculations. How can the compiler know about your future plans? I think that doing it the way you imagine it would probably be right, but very hard. If you try to present an algorithm of such checking, you can write the following: the programmer checks if a variable is assigned some value. If not, it means that it is not used. Try to give a rough algorithm for determining that a variable is initialized, but is not used anywhere else in calculations.
The number of variables with the same name... is questionable.
How would the compiler know about your future plans?
The compiler sometimes throws out whole chunks because it knows
Forum on trading, automated trading systems and strategy testing
Alternative implementations of standard functions/approaches
Renat Fatkhullin, 2016.09.01 23:50
To avoid the compiler throwing out the loop because it's useless, you have to use the results of calculations. For example, make Print variable Price.
The compiler throws out whole chunks sometimes because it knows
Well, if Renat hasn't had enough of answering, let's wait for his answer. And in principle I am personally satisfied with everything.
How do I make a #uninclude?
Correct either the value or the unit
How do you make a #uninclude?
You cannot do it directly. Code refactoring (different file structure or OOP) will help.