[amibroker] Re: Embarrassing question...

2010-07-10 Thread Mike
Your assumption is mistaken. Unless explicitly stated otherwise, the scope of the variable is dictated by where it first appears. Since test_sig first appears within your procedure, it defaults to local to that procedure. You can override that by declaring it global from within the procedure, or

[amibroker] Re: Embarrassing question...

2010-07-10 Thread Rob
Ahhh. Ok. I've got you... I was under the impression it was where they are 'first used'. i.e. if a function is not called in the main code until after the declaration of a variable (outside of the function) then it was 'first used' in the main code and hence global... I guess 'first used' means

Re: [amibroker] Re: Embarrassing question...

2010-07-11 Thread Tomasz Janeczko
Hello, From: http://www.amibroker.com/guide/a_userfunctions.html "If given *identifier appears first *INSIDE function definition - then it is treated as LOCAL variable. If given *identifier appears first *OUTSIDE function definition - then it is treated as GLOBAL variable." I was under the