all the global scope variables are static
static variables in the local scope
static variables in the local scope
In same topic as above.
as example if have
and
as example if have
int x() { for(int i=0;...)<operation>; }
and have
int start() { for(int i=0;...)<someOtherOperation>; }
compiler says:
'i' - variable is already defined ...
I understand "local" to mean scope is within function x()
Meaning "int i" in function start() should be allowed.
ie: different function, different name space etc.
Following help text is saying local = local scope therefor identifier name should be available for reuse in any other function... YES?
[I use MetaEditor 4.00 Build 191]
Navigator help states:
Global variables are defined at the same level as functions, i.e. they are not local in any block. ... Scope of global variables is the entire program. Global variables are accessible from all functions defined in the program.
and
A variable declared inside any function is local. The scope of a local variable is limited to the function range inside which it is declared. ... Local variables are stored in memory area of the corresponding function.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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 think I saw this in another thread, but can't locate it now.
Thanks in advance!
Alan