Changing signs using variables | | We are using Custom Macro B extensively on a CNC lathe. When trying to change the sign of a variable from positive to negative, we seem to only be able to change it using a two line formula. In the example below, we are trying to change variable #527 to a negative value. I would like to do it on one line, but either MacroB doesn't follow all algebraic rules or my algebra just plain sucks (and that may very well be the case). The fact that we can't use parenthesis doesn't help either, since the control ignores it like any comment in the code.
#6=#527-.12
#6=-#6
I've tried things like #6=[-]#527-.12 and #6=[[#527*-1]-.12]
Any suggestions from the sharp folks on here? |