PureBytes Links
Trading Reference Links
|
Hello,
I am building a program in a modular way with #includes. I would like
modules to contain all their needed variables included as default
values, but I would like let the values be pre-defined to override the
defaults. I know how to do this with static variables since an
undefined static variable will return a null or "" depending on the
type. However, I wanted to do this with regular variables and I did
not want to define them all ahead of time (like explicitly assigning
them null to use the default). That way I can add functionality to an
#include file without having to worry about changing all the old
programs that use it to add the new variables.
For instance using a hypothetical isDefined() function:
myVar1 = myOverrideValue;
// #include starts here:
if( not isDefined( myVar1 ) { myVar1 = DefaultValue1; } // this one is
overridden
if( not isDefined( myVar2 ) { myVar2 = DefaultValue2; } // this one is
not
... AFL stuff
// #include ends
I would appreciate any ideas.
Thanks,
Dennis
------------------------------------
**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
*********************
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
*********************************
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|