What exactly is macro B?
Just the ability to have variables, and do calculations within the code?
If it is, Dynomotion KMotionCNC can do it, as they include some examples

It's something I've never had any dealings with, as most stuff I do on the lathe I just write manually, and the mill gets done using CAM.