I need to use a global variable in a procedure. I will set the variable to 1 depending on some logic. Outside the scope of this procedure, I have a loop where I need to store the indices of the loop in a two dimensional array based on the variable set in the procedure. How do I implement this. Can I get a help plz.