Errors, bugs, questions - page 2565
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
I'm not going to argue
I decided to describe the problem that we're discussing. By the way, MQL's behavior has become more and more similar to that of C#, the code does not compile
I've implemented Inc() method - it works with protected fields
if i added a static modifier - where should the compiler stop checking? - i've decided i need an entry point to an object out of scope?
If you have written a static method/field or applied a ::: - do not rely on the compiler
Bugs happen. I write code as before: this, ::, const, static, private, public, protected are put wherever it is possible.
I need it first of all for a quick understanding of my code. Secondly, I want the compiler to help me while writing my code. It helps me a lot.
Yesterday I faced such a situation for the first time. I wrote a 5Kb code some part of which was copied and pasted from various fragments. And when compiling it for the first time there appeared not a single error or warning. I was surprised.
I have decided to describe the problem we are discussing
I decided to describe the problem that we're discussing. By the way, MQL's behavior looks more and more like C#, the code doesn't compile
the inc() method - it works with protected fields
if i added a static modifier - where should the compiler stop checking? - i made a decision that i need an entry point to an object out of scope, right?
Your count variable is not static.
How does a static function know which object this variable belongs to?
Your variable count is not static.
How will a static function know which object this variable belongs to?
not a principle, I mean that any implementation of working with static methods will not have a complete check by the compiler, and the entire responsibility for control falls on the programmer
ok, never mind, because it doesn't matter - I wrote the same thing twice in one dayhttps://www.mql5.com/ru/forum/1111/page2564#comment_13249284
I mean that any implementation of static methods will not be fully validated by the compiler, and all the responsibility for control falls on the programmer
Where did you read this?
Did you invent it yourself and repeat it without stopping?
Where did you read that?
Did you make it up yourself and keep repeating it?
I didn't come up with it, it's my opinion... like, in principle, to close all work with statics only within statics as in C# - then there will be no questions or errors ;)
A few questions on the platform:
1. will a permissible trading range be added for VPs via MOEX (e.g. EURRUB_TOM)? Right now it is impossible to know for sure if a limit will be set, as there is no access to the range (max and min possible prices). Please add.
2. Is it possible to add to the terminal and meta-editor an auto-save status every N minutes? Very lacking, as with a sudden disconnection you go back to the state at the start of the program with loss of all changes! Very stressful!
MQ, are you guys OK with the storage? It takes 10-20 seconds to commit a file. It used to be instantaneous...
Added: sometimes the commit just hangs...