Is there a way to have global #define constants and global Dim variables span the whole project. I tried using #include to add a file of #defined constants, but that did not work. the widest scope of variables I can get is just within the individule .BAS file, but not across all .BAS files.
Is there a solution? I realize that project scope variables are frowned upon stylistically, but there would only be a couple of them and it save use of getters and setters.
-Tony
Global #define constants and global variables ?
Re: Global #define constants and global variables ?
For a #define constant to be available across all modules, it must be defined on the command line. This can most easily be done via the project file.spamiam wrote:Is there a way to have global #define constants and global Dim variables span the whole project.
Code: Select all
-Dfoo=bar
As for variables, use Public instead of Dim to make them globally available.
- Don Kinzer