Initializing Global Variables

Navigation:  Macros > Macro Language > Variables > Global Variables >

Initializing Global Variables

Previous pageReturn to chapter overviewNext page

Since global variables keep their value from one execution of the macro to another, it is important to be able to decide in your code if a given global variable has been used before (in which case you do not modify its value at the start of the macro), or if it is the first time (in which case you must initialize it just like any other variable). To see this you call the IsInitialized() function.






 // check if ng_1 was initialized before

 if IsInitialized(nGlob)

         nGlob = nGlob + 1 // increase it


         nGlob = 1 // initialize it


 // ...


Topic 134700 updated on 01-Oct-2001.
Topic URL: