Errors, bugs, questions - page 1332

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
Your advice is meaningless in practice. Nobody gives identical names on purpose. The code of local functions lives its own separate life while the external program lives its own life. And the names of external variables can change with time and new external variables can 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.
I wasn't looking for an excuse for developer bugs, but this bug is easily circumvented by not using the same variable names that are responsible for the input parameters when working in a project. Just change the name in the input parameters, I doubt you have hundreds of variables in your input parameters and need to edit all the code :) the main part of the code is usually written at the entry point of the software and it is not that big, everything is done by function(method) calls. And to functions (methods) there is no difference what name of a variable is passed in input parameters of function.
Of course, if you write code where functions use global variables, then of course, you will have to change a lot of things, but this code is written with absolutely no vision, it is really difficult to modernize.
Although if you look at the developer (MetaQuotes) with a consumer point of view, of course, you want a lot of everything at once :) I would like to work in a terminal that is cross-platform, but the answer to this request will be one - either use what you have or pass it by :)
Just change the name in the input parameters...
You have a kind of flippant view. Just change it like that... Then some other function will be added to the code where the local variable name matches and you have to change it again, right? An external variable name is not just a bunch of letters, it has a specific meaning. Sometimes you have to think hard to find a concise and succinct name for it, and you say - change it. And all the preset settings, as well as tester and optimizer settings will be lost for this parameter if the name is changed.
Suppose you inserted some function from somewhere outside, perhaps it was not even written by you, so the local variable names there can be absolutely any.
You have a kind of flippant view. Then some other function is added to the code where the local variable has the same name, and you have to change it again, right? The name of an external variable is not just a bunch of letters, it has a specific meaning. Sometimes you have to think hard to find a succinct and succinct name for it, and you are saying - change it. And all the preset settings, as well as tester and optimizer settings will be lost for this parameter if the name is changed.
Suppose you inserted some function from somewhere outside, perhaps it was not even written by you, so the names of local variables there can be absolutely any.
Do as you see fit, but it looks like you haven't written any big projects.
It makes no sense for me to look at my function definitions, because I have a clear distinction in the style of declaration of global and local variable names. Therefore, I do not encounter such problems as coincidence of global and local variable names. The main thing is that functions work out their logic without collisions. In your case there is one big BUT, if you coincide a name of a global variable with a name of a local variable, expect surprises, which you have already started to clear up.
For example, put an extra _ in the local variable name, for example _iCount. In this case you will never have problems with variables' names, because you will fulfill what you are trying to explain me the second time - variables live in a local scope, where they were created. And no global variable in this case will not introduce ambiguity in the names. And let's close our discussion at this point.
Going back to my previous post. MT4/845, Windows7/64 bit, script:
Result:
Administration, add in DoubleToString that this function rounds floating point numbers to the specified precision.
It is a good idea not to name local and input variables the same way
It is a good idea not to name local and input variables the same way
Try to continue the line in ME in the attached file without spaces
When discussing an issue, is it OK to link to a product on the Market? Or would that be considered advertising and prohibited?
Questionable compilation result after operator ? :
Result: 65618 (how did it get like that?) and there should be a compile-time error