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
nGlob = nGlob + 1 // increase it
nGlob = 1 // initialize it