It has been a while since I used it and now that I think of it some controls may want the variable in []. I have used this type of program on both Mit and Fanuc controls.
GOTO[#10]
It is just like when you use a variable in a gcode word like the code below.
Set #3 to 0 and the path goes around counter clockwise, set it to 1 and the path goes around clockwise. You can do this type of thing when you want to mirror the cut but still climb mill on both mirrored and non mirrored parts.
Code:
#3=1 (0 COUNTER CLOCKWISE, 1 CLOCKWISE)
G0X0Y0
G1G[41+#3] X1.000 D1 F20.0
G1 Y[-0.750*[[#3*2]-1]]
G[3-#3] X0.750 Y[-1.000*[[#3*2]-1]] R0.250
G1 X-0.750
G[3-#3] X-1.000 Y[-0.750*[[#3*2]-1]] R0.250
G1 Y[0.750*[[#3*2]-1]]
G[3-#3] X-0.750 Y[1.000*[[#3*2]-1]] R0.250
G1 X0.750
G[3-#3] X1.000 Y[0.750*[[#3*2]-1]] R0.250
G1 Y0.000
G1G40 X0 Y0