Hi All,I've been looking through previous messages and the Amibroker
user guide and have been unable to find an answer, so I hope one of you
can help.
When defining a Dynamic Variable is behaves like a normal variable in
terms of scope. So if defined outside of a function its scope will be
global, and if defined within a function its scope will be restricted to
be within that function.
To make a normal variable that is defined within a function global we
can use the global keyword. Is there a way we can also do this for
dynamic variables? I tried global VarSet("someVariable"+i,n); but that
just throws a syntax error.
Now I could just not use functions, but that's just bad design. Is there
a way I can define global dynamic variables from within a function, or
perhaps return dynamic variables from a function?
---------------Now for the second question:
How do I reference a specific element of an Array that is a Dynamic
Variable?
With a normal array I can just do this someArray[1]But with a Dynamic
Variable that is an array I can't do this VarGet("someArray"+n[1]) or
this VarGet("someArray"+n)[1]
Cheers, Blair