PDA

View Full Version : MTC.sbp - CHECK_MTL subroutine



Scott216
08-31-2017, 10:52 AM
I was looking at MTC.sbp and can't figure out why CHECK_MTL subroutine is there. It doesn't seem to do anything. No matter what, it's going to set &z_adjust to zero.

First line is commented out. Second line sets &zshift to zero.
If MSGBOX answer is NO, then &z_adjust = 0 * 0
if MSGBOX answer is YES, then &z_adjust = 0 * 1



CHECK_MTL:
'If &zshift = 0 Then GoSub MTL_ERROR
&zshift = 0
if &zero_to_bed = 0 then GoTo doaskbed
if &zero_to_bed = 1 then GoTo doaskbed
MSGBOX(Did you Zero to bed? ,YesNo,ZERO BIT?)
doaskbed:
if &msganswer = NO then &zero_to_bed = 0
if &msganswer = YES then &zero_to_bed = 1

&z_adjust = &zshift * &zero_to_bed
return

Gary Campbell
08-31-2017, 12:58 PM
Scott...
I didn't write the code, but my guess is that it is in there for compatibility with the ShopBot Link which uses the "&zshift" variable. I would imagine that when in use the comment may be removed from one line and others would rem'd out

Scott216
08-31-2017, 04:02 PM
Thanks. I think I'll just delete it from my version - clean things up a bit