PureBytes Links
Trading Reference Links
|
I am trying to use functions which include if-then-else logic but I
am also using AFL arrays in and out of the functions. If I call a
function and need to pass the current array index how do I get it?
Is there a function that provides the current array index.
It seems that BarIndex() was provided to give this but the return
variable is an array not an integer. This is not compatible with if
logic and I get an error when I try to use it. How do I use BarIndex
to get an integer that I can use to index an array element?
If BarIndex() is not used to provide the integer then what can I use
to get the current index? I do not want to use a for loop but I can
if that is the only way.
Also, can functions use global variables, and if so do they need to
be declared and initialized above the function code?
Thanks,
Barry
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|