Gar thanks for responding as it seems you have a good grip on macros, but let me see if I can sum this up, it will work but you would prefer better notations and terminology?
Your view on this maybe different then mine as I consider a counter a method to add a number to another coming up with a result.
If you would post what you would feel a counter I can see the difference between the way we both look at it.
When you do #101 = 0 you are initializing Z to 0 relative to whatever G5x is active.
The variable is set to 0, at this point there is no other influence until G5x was called up.
Then why would I want to set #101 to the value of #100 inside of the loop?
if #101 reached a depth deeper then #100 it would revert to #100, thus preventing undercut area.
My Response to "It's Close Enough", "Is Your Tool Box and The Door Close Enough?"