mvbasic
mvbasic copied to clipboard
[FEATURE] Label jumping out of code block
Describe the bug Lint shows an error on both lines with "GOTO 208". 208 is trying to go out of scope ex TEST(24, 20): Invalid GOTO or GOSUB, jumping into/out of a block This code compiles without issue and works in our production jBase environment. In this snippet, we want to jump back to the input if we receive bad input from the user. I took this snippet from an existing program and just copied this portion of code to make sure that it was not falsely complaining about other code in the program.
Code samples and/or reproduceable test cases FOR P=1 TO NUM.LINES TOT.PICKED=TEMP2<P,3> ;*Picked = Shipped IF TOT.PICKED > "0" THEN ;Don't put back parts not yet picked PN=TEMP2<P,2> SCANNED.BIN=TEMP2<P,1> LOC=TEMP2<P,20> READ PRD FROM F.PRODUCT,PN:"":LOC ELSE PRD="" MFG=PRD<4> PART.NUM=PRD<19> BIN1=PRD<60,1> BIN2=PRD<60,2> PRINT @(0,1):WIPE:"Reverse Pick" PRINT @(0,2):WIPE:"Loc ":LOC PRINT @(0,3):WIPE:"Part# ":MFG:PART.NUM PRINT @(0,4):WIPE:"QTY ":TOT.PICKED PRINT @(0,5):WIPE:"Bin1 ":BIN1 PRINT @(0,6):WIPE:"Bin2 ":BIN2 208 PRINT BOTTOM.POS:"Bin Location": INPUT SOURCE.DESTINATION: SOURCE.DESTINATION.MODE="D" IF SOURCE.DESTINATION.ERROR#"" THEN PRINT BOTTOM.POS:SOURCE.DESTINATION.ERROR RQM(2) GOTO 208 END THIS.SCAN.QTY=TOT.PICKED LOC.QTY.MODE="R" IF LOC.QTY.ERROR#"" THEN PRINT BOTTOM.POS:LOC.QTY.ERROR RQM(2) GOTO 208 END END NEXT P