I don't know if this has been mentioned before. In MetaEditor, if input variable name coincides with local variable name (or class field name), the latter is highlighted in red everywhere, just like input variable. This causes confusion when reading code. We should fix this.
Alexey Navoykov: I don't know if it's been said before or not. In MetaEditor if input variable name coincides with local variable name (or class field name) the latter is marked red everywhere, as well as input variable. It causes confusion when reading code. We should fix this.
giving identical names to code entities is an attempt to shoot oneself in the foot :)
It's easier to change the name of an input variable and you won't have any problems and confusion...
giving identical names to code entities is an attempt to shoot oneself in the foot :)
It's easier to change the name of an input variable and you won't have any problems or confusion...
Your advice is meaningless in practice. Nobody gives identical names on purpose. The local function code lives its own separate life, while the external program lives its own life. And the names of external variables may change over time and new external variables may be added.And if after that, suddenly one of hundreds of functions hasa local variable with the same name, what do you think we should rename the global variable? You should not look for excuses for developers' bugs.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Like this - there would really be an ambiguity
which is strangely overcome by the compiler if you rewrite the example differently
I don't know if it's been said before or not. In MetaEditor if input variable name coincides with local variable name (or class field name) the latter is marked red everywhere, as well as input variable. It causes confusion when reading code. We should fix this.
giving identical names to code entities is an attempt to shoot oneself in the foot :)
It's easier to change the name of an input variable and you won't have any problems and confusion...
MT4/845, Windows7/64 bit. Question about text to a new line with \n. I made a script:
Result:
Was hoping that Text_2 and Text_4 values would be on other lines. Please advise what is wrong.
giving identical names to code entities is an attempt to shoot oneself in the foot :)
It's easier to change the name of an input variable and you won't have any problems or confusion...
MT4/845, Windows7/64 bit. Script:
Result:
Does anyone know how to print the number 0.55001234 ?
MT4/845, Windows7/64 bit. Script:
Result:
Does anyone know how to print the number 0.55001234 ?
MT4/845, Windows7/64 bit. Question about text to a new line with \n. Made a script:
Apparently a bug in MT4 (MT5 is fine)