Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Share global declarations between macros
#1
Question 
Hello,

First, thank you for Quick Macros! It is a really excellent tool!

I apologize in advance if this is a "newbie" question...

I am working on programming an application that uses several macros and functions. I want to be able to communicate state information between the elements via global variables (ex. int+ State) and constants that are defined via the def directive. Is there an #include type of functionality where I can define my globals and def constants in one place and then use them in each of the macros or functions that need to access the global state variables?

Thank you

Fred
#2
There is no #include, but are several similar options.


Quote:I am working on programming an application that uses several macros and functions


If the application always runs in Quick Macros, ie not as separate .exe file, you can:
Create function named "init2", if does not exist. Place the int+, def etc there. Run it. Next time, when QM starts, the function runs automatically. Global variables and constants are available in all macros/functions/etc.

If the application runs as .exe, create a function like described above and call it at the start of application. If the application also runs in QM, call the function from function init2.

See also in QM help: #compile


Forum Jump:


Users browsing this thread: 3 Guest(s)