Hello,
Thank you very much for your e-mail.
You are mixing up the terms.
A local function is a function defined within (inside) another function or class.
There are no "local" functions in C and there are no local functions in AFL,
there are only global functions, i.e all functions are defined in global scope.
What you meant in C-speak is actually called an "extern" function.
In C you need to use #include to provide declarations/prototypes of extern functions.
In AFL, for the function to be visible its definition must be visible to running formula.
One method to achieve this is to put that function inside separate file and use
#include or #include_once
http://www.amibroker.com/guide/afl/_include.html
Best regards,
Tomasz Janeczko
amibroker.com
I want to write a global function which is accessible everywhere in AFL environment. I just need to call it any where in any afl.
where to define such function?
Posted by: Tomasz Janeczko <groups@amibroker.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
EmoticonEmoticon