-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Label jumping out of code block #105
Comments
Thanks, @brentlblair . This issue is related to issues #99 and #104, which I hope to resolve for the v1.0.7 release. |
I do not see this error on the released version of the extension that I have which is 2.0.5. However, I don’t see an “*” on the comment that is on the line with IF TOT.PICKED > “0” THEN line either. Do you have other code from outside of the FOR/NEXT loop that references the 208 label?
[A screenshot of a cell phone Description automatically generated]
Please don’t take offense to this but I have a particular aversion to the use of GOTO statements. I would likely refactor your code as:
[A screenshot of a cell phone Description automatically generated]
From: Brent Blair <[email protected]>
Reply-To: mvextensions/mvbasic <[email protected]>
Date: Wednesday, June 3, 2020 at 2:05 PM
To: mvextensions/mvbasic <[email protected]>
Cc: Subscribed <[email protected]>
Subject: [mvextensions/mvbasic] [BUG] Label jumping out of code block (#105)
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
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#105>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACOODLYS2V2LJE6SEH3NPZ3RU2NIDANCNFSM4NR6DAKQ>.
|
I was surprised to see that my system had version 2.0.5 of the extension since I thought that 2.0.6 was the currently released version.
From: Kevin Powick <[email protected]>
Reply-To: mvextensions/mvbasic <[email protected]>
Date: Wednesday, June 3, 2020 at 2:48 PM
To: mvextensions/mvbasic <[email protected]>
Cc: Subscribed <[email protected]>
Subject: Re: [mvextensions/mvbasic] [BUG] Label jumping out of code block (#105)
Thanks, @brentlblair<https://github.com/brentlblair> . This issue is related to issues #99<#99> and #104<#104>, which I hope to resolve for the v1.0.7 release.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#105 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACOODL7I3WM2VF6KQKXL4JLRU2SHZANCNFSM4NR6DAKQ>.
|
No, the only references to 208 are in the code block that I sent you.
*Brent Blair* <http://www.linkedin.com/in/BrentLBlair>
Vice President of IT
Encompass
Phone 954.474.0300
Fort Lauderdale, FL
<https://www.google.com/maps/place/Encompass+Parts+Distribution/@26.145357,-80.2482168,12.46z/data=!4m5!3m4!1s0x0:0xb2bfe23d3412449!8m2!3d26.0920996!4d-80.2409538>
[email protected]
encompass.com
…On Wed, Jun 3, 2020 at 3:53 PM Dick Thiot ***@***.***> wrote:
I do not see this error on the released version of the extension that I
have which is 2.0.5. However, I don’t see an “*” on the comment that is on
the line with IF TOT.PICKED > “0” THEN line either. Do you have other code
from outside of the FOR/NEXT loop that references the 208 label?
[A screenshot of a cell phone Description automatically generated]
Please don’t take offense to this but I have a particular aversion to the
use of GOTO statements. I would likely refactor your code as:
[A screenshot of a cell phone Description automatically generated]
From: Brent Blair ***@***.***>
Reply-To: mvextensions/mvbasic ***@***.***>
Date: Wednesday, June 3, 2020 at 2:05 PM
To: mvextensions/mvbasic ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [mvextensions/mvbasic] [BUG] Label jumping out of code block
(#105)
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
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<
#105>, or unsubscribe<
https://github.com/notifications/unsubscribe-auth/ACOODLYS2V2LJE6SEH3NPZ3RU2NIDANCNFSM4NR6DAKQ>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#105 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFRDR4MVNPCYDR3XS3AMABDRU2S5DANCNFSM4NR6DAKQ>
.
|
I was surprised to see that my system had version 2.0.5 of the extension since I thought that 2.0.6 was the currently released version.
Yes, 2.0.6 is the released version. I'm surprised you have 2.0.5 ;)
|
I uninstalled and reinstalled and I now have 2.0.6. However, I don’t see the error that Brent is seeing. The formatter does not properly indent the code either.
[A screen shot of a computer Description automatically generated]
From: Kevin Powick <[email protected]>
Reply-To: mvextensions/mvbasic <[email protected]>
Date: Wednesday, June 3, 2020 at 2:59 PM
To: mvextensions/mvbasic <[email protected]>
Cc: Dick Thiot <[email protected]>, Comment <[email protected]>
Subject: Re: [mvextensions/mvbasic] [BUG] Label jumping out of code block (#105)
I was surprised to see that my system had version 2.0.5 of the extension since I thought that 2.0.6 was the currently released version.
Yes, 2.0.6 is the released version. I'm surprised you have 2.0.5 ;)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#105 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACOODL25NQFYUL2YJ3S44SLRU2TQ3ANCNFSM4NR6DAKQ>.
|
I uninstalled and reinstalled and I now have 2.0.6. However, I don’t see the error that Brent is seeing. The formatter does not properly indent the code either.
I have 2.0.6 installed. Formatting is ok, and the error is as Brent describes. Not sure what's up with your local system. Try VSC restart?
[A screen shot of a computer Description automatically generated]
Your screen shots are not being included.
|
Kevin, not sure this is related to those issues, there's explicit code to check for jumping into or out of a block (technically any code at a different indent level) in the linter. I sort of agree with the intent of that, but it's quite opinionated of the extension to flag it as an error - it's legal syntax and there's plenty of legacy code around that does worse :_) The intent of this check is good, but it's perhaps a mistake to flag legal code as an error (maybe a warning makes more sense?).
Here's a more minimal test case that is legal syntax, no label issues, but flags the goto as an error:
Because the checking is happening based purely on tracking the "level" of each line, you can fool this check by adding a dummy for loop to push the label to the same level as the goto and the error goes away.
|
My vote would be to add extension settings to control this. I use PHPStorm,
and it has a whole section of user settings around linter.
I don’t want to see this flagged as an error or warning, whereas other
users might. I have to imagine there will be other similar situations with
the linter where we could all debate what should be considered a warning,
error, or nothing.
On Fri, Jun 5, 2020 at 12:18 AM Ian McGowan ***@***.***> wrote:
Thanks, @brentlblair <https://github.com/brentlblair> . This issue is
related to issues #99 <#99>
and #104 <#104>, which I
hope to resolve for the v1.0.7 release.
Kevin, not sure this is related to those issues, there's explicit code to
check for jumping into or out of a block (technically any code at a
different indent level) in the linter. I sort of agree with the intent of
that, but it's quite opinionated of the extension to flag it as an error -
it's legal syntax and there's plenty of legacy code around that does worse
:_) The intent of this check is good, but it's perhaps a mistake to flag
legal code as an error (maybe a warning makes more sense?).
if (
labelMatch.Level != RowLevel[i] &&
labelMatch.Level > 1 &&
ignoreGotoScope === false
) {
// jumping into or out of a loop
Here's a more minimal test case that is legal syntax, no label issues, but
flags the goto as an error:
FOR X=1 TO 20
CRT X
IF X > 10 THEN
LOOPING:
CRT 'ENTER / TO QUIT: X=':X
INPUT AAA
IF AAA#'/' THEN
GOTO LOOPING
END
END
NEXT X
Because the checking is happening based purely on tracking the "level" of
each line, you can fool this check by adding a dummy for loop to push the
label to the same level as the goto and the error goes away.
FOR X=1 TO 20
IF X > 10 THEN
FOR F=1 TO 1
LOOPING:
NEXT F
PRINT 'ENTER / TO QUIT: X=':X
INPUT AAA
IF AAA#'/' THEN
GOTO LOOPING
END
END
NEXT X
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#105 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFRDR4PH5XWTZS7M3CC7MITRVBW27ANCNFSM4NR6DAKQ>
.
--
*Brent Blair* <http://www.linkedin.com/in/BrentLBlair>
Vice President of IT
Encompass
Phone 954.474.0300
Fort Lauderdale, FL
<https://www.google.com/maps/place/Encompass+Parts+Distribution/@26.145357,-80.2482168,12.46z/data=!4m5!3m4!1s0x0:0xb2bfe23d3412449!8m2!3d26.0920996!4d-80.2409538>
[email protected]
encompass.com
|
Kevin, not sure this is related to those issues, there's explicit code to check for jumping into or out of a block (technically any code at a different indent level) in the linter. I sort of agree with the intent of that, but it's quite opinionated of the extension to flag it as an error
I completely agree and was actually thinking of removing it entirely. It might be "bad form", but if the compiler allows it, the extension shouldn't flag it as an error.
I think that future versions of the extension could include options to warn about such coding practices, but not at this stage of its development.
|
There is a flag, ignoreGotoScope, you can set it by adding this to your
settings (workspace or global). Maybe we should set the default for this to true?
"MVBasic.ignoreGotoScope": true,
On Thu, Jun 4, 2020 at 10:04 PM Brent Blair <[email protected]>
wrote:
… My vote would be to add extension settings to control this. I use PHPStorm,
and it has a whole section of user settings around linter.
I don’t want to see this flagged as an error or warning, whereas other
users might. I have to imagine there will be other similar situations with
the linter where we could all debate what should be considered a warning,
error, or nothing.
On Fri, Jun 5, 2020 at 12:18 AM Ian McGowan ***@***.***>
wrote:
> Thanks, @brentlblair <https://github.com/brentlblair> . This issue is
> related to issues #99 <#99
>
> and #104 <#104>, which I
> hope to resolve for the v1.0.7 release.
>
> Kevin, not sure this is related to those issues, there's explicit code to
> check for jumping into or out of a block (technically any code at a
> different indent level) in the linter. I sort of agree with the intent of
> that, but it's quite opinionated of the extension to flag it as an error
-
> it's legal syntax and there's plenty of legacy code around that does
worse
> :_) The intent of this check is good, but it's perhaps a mistake to flag
> legal code as an error (maybe a warning makes more sense?).
>
> if (
> labelMatch.Level != RowLevel[i] &&
> labelMatch.Level > 1 &&
> ignoreGotoScope === false
> ) {
> // jumping into or out of a loop
>
> Here's a more minimal test case that is legal syntax, no label issues,
but
> flags the goto as an error:
>
> FOR X=1 TO 20
> CRT X
> IF X > 10 THEN
> LOOPING:
> CRT 'ENTER / TO QUIT: X=':X
> INPUT AAA
> IF AAA#'/' THEN
> GOTO LOOPING
> END
> END
> NEXT X
>
> Because the checking is happening based purely on tracking the "level" of
> each line, you can fool this check by adding a dummy for loop to push the
> label to the same level as the goto and the error goes away.
>
> FOR X=1 TO 20
> IF X > 10 THEN
> FOR F=1 TO 1
> LOOPING:
> NEXT F
> PRINT 'ENTER / TO QUIT: X=':X
> INPUT AAA
> IF AAA#'/' THEN
> GOTO LOOPING
> END
> END
> NEXT X
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <
#105 (comment)
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AFRDR4PH5XWTZS7M3CC7MITRVBW27ANCNFSM4NR6DAKQ
>
> .
>
--
*Brent Blair* <http://www.linkedin.com/in/BrentLBlair>
Vice President of IT
Encompass
Phone 954.474.0300
Fort Lauderdale, FL
<
***@***.***,-80.2482168,12.46z/data=!4m5!3m4!1s0x0:0xb2bfe23d3412449!8m2!3d26.0920996!4d-80.2409538
>
***@***.***
encompass.com
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#105 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADD3DZZ7L4KACYBISMFVELRVB4FXANCNFSM4NR6DAKQ>
.
|
Sorry, I didn't notice that in the settings, you can close this issue.
I do agree that it should be changed either way from an error to a warning
since it compiles.
I changed it to true, so it would be more of a suggestion for anyone who
leaves the setting false.
*Brent Blair* <http://www.linkedin.com/in/BrentLBlair>
Vice President of IT
Encompass
Phone 954.474.0300
Fort Lauderdale, FL
<https://www.google.com/maps/place/Encompass+Parts+Distribution/@26.145357,-80.2482168,12.46z/data=!4m5!3m4!1s0x0:0xb2bfe23d3412449!8m2!3d26.0920996!4d-80.2409538>
[email protected]
encompass.com
On Fri, Jun 5, 2020 at 10:18 AM Ian McGowan <[email protected]>
wrote:
… There is a flag, ignoreGotoScope, you can set it by adding this to your
settings (workspace or global):
"MVBasic.ignoreGotoScope": false,
On Thu, Jun 4, 2020 at 10:04 PM Brent Blair ***@***.***>
wrote:
> My vote would be to add extension settings to control this. I use
PHPStorm,
> and it has a whole section of user settings around linter.
> I don’t want to see this flagged as an error or warning, whereas other
> users might. I have to imagine there will be other similar situations
with
> the linter where we could all debate what should be considered a warning,
> error, or nothing.
>
> On Fri, Jun 5, 2020 at 12:18 AM Ian McGowan ***@***.***>
> wrote:
>
> > Thanks, @brentlblair <https://github.com/brentlblair> . This issue is
> > related to issues #99 <
#99
> >
> > and #104 <#104>, which I
> > hope to resolve for the v1.0.7 release.
> >
> > Kevin, not sure this is related to those issues, there's explicit code
to
> > check for jumping into or out of a block (technically any code at a
> > different indent level) in the linter. I sort of agree with the intent
of
> > that, but it's quite opinionated of the extension to flag it as an
error
> -
> > it's legal syntax and there's plenty of legacy code around that does
> worse
> > :_) The intent of this check is good, but it's perhaps a mistake to
flag
> > legal code as an error (maybe a warning makes more sense?).
> >
> > if (
> > labelMatch.Level != RowLevel[i] &&
> > labelMatch.Level > 1 &&
> > ignoreGotoScope === false
> > ) {
> > // jumping into or out of a loop
> >
> > Here's a more minimal test case that is legal syntax, no label issues,
> but
> > flags the goto as an error:
> >
> > FOR X=1 TO 20
> > CRT X
> > IF X > 10 THEN
> > LOOPING:
> > CRT 'ENTER / TO QUIT: X=':X
> > INPUT AAA
> > IF AAA#'/' THEN
> > GOTO LOOPING
> > END
> > END
> > NEXT X
> >
> > Because the checking is happening based purely on tracking the "level"
of
> > each line, you can fool this check by adding a dummy for loop to push
the
> > label to the same level as the goto and the error goes away.
> >
> > FOR X=1 TO 20
> > IF X > 10 THEN
> > FOR F=1 TO 1
> > LOOPING:
> > NEXT F
> > PRINT 'ENTER / TO QUIT: X=':X
> > INPUT AAA
> > IF AAA#'/' THEN
> > GOTO LOOPING
> > END
> > END
> > NEXT X
> >
> > —
> > You are receiving this because you were mentioned.
> > Reply to this email directly, view it on GitHub
> > <
>
#105 (comment)
> >,
> > or unsubscribe
> > <
>
https://github.com/notifications/unsubscribe-auth/AFRDR4PH5XWTZS7M3CC7MITRVBW27ANCNFSM4NR6DAKQ
> >
> > .
> >
> --
>
> *Brent Blair* <http://www.linkedin.com/in/BrentLBlair>
>
> Vice President of IT
> Encompass
> Phone 954.474.0300
> Fort Lauderdale, FL
> <
>
***@***.***,-80.2482168,12.46z/data=!4m5!3m4!1s0x0:0xb2bfe23d3412449!8m2!3d26.0920996!4d-80.2409538
> >
>
> ***@***.***
> encompass.com
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <
#105 (comment)
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AADD3DZZ7L4KACYBISMFVELRVB4FXANCNFSM4NR6DAKQ
>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#105 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFRDR4JRIY2X5YJHUNUYPFDRVD5DNANCNFSM4NR6DAKQ>
.
|
This setting may need to have 3 choices: ignore, warning or error. The MVON# extension is the ancestor of this extension, and in the MVON# version of BASIC, jumping out of a code block is indeed an error. For other MV flavors it could be a warning or just ignored depending on policy. |
Especially since the linting is completely "lexical" and doesn't really consider the structure of the program at all. It would be awesome to actually parse the program into tokens and make the linting more aware of the structure, but that's a non-trivial task. Pete S. has a parser written in dotnet that might make a starting point after converting to typescript. |
That's good to know! I retract my "opinionated" comment :-) It does make clear how challenging parsing the different flavors will be. I'd vote for vanilla-R83 linting to start! |
I may be wrong in this but my understanding of MVON# is that you can GOTO outside of a structure (IF/END, FOR/NEXT, LOOP/REPEAT, etc) but you cannot GOTO the middle of a structure. It is not something that C# allows and MVON# is transpiled to C# and then compiled with the .NET compiler.
From: Ian McGowan <[email protected]>
Reply-To: mvextensions/mvbasic <[email protected]>
Date: Friday, June 5, 2020 at 10:41 AM
To: mvextensions/mvbasic <[email protected]>
Cc: Dick Thiot <[email protected]>, Comment <[email protected]>
Subject: Re: [mvextensions/mvbasic] [BUG] Label jumping out of code block (#105)
This setting may need to have 3 choices: ignore, warning or error. The MVON# extension is the ancestor of this extension, and in the MVON# version of BASIC, jumping out of a code block is indeed an error. For other MV flavors it could be a warning or just ignored depending on policy.
That's good to know! I retract my "opinionated" comment :-) It does make clear how challenging parsing the different flavors will be. I'd vote for vanilla-R83 linting to start!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#105 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACOODLY4CHJH3WIVG73MDETRVEG3RANCNFSM4NR6DAKQ>.
|
That's a really good idea. I can imagine a lot more settings like ignoreGotoScope. And it would be nice to have a hierarchy if possible: |
There seems to be several things to consider here. Since we have the |
Agreed. Brett is ok with using the option for now, and mass changes to the linter is something that will take a while to work through and test (if it's even considered a good idea). Vote to close? |
I'll just remove the 2.0.7 milestone and change it from a bug to an FEATURE request. |
For 2.0.7, this scope jumping message from the linter is changed from an Error to a Warning. As noted, this check can be enabled/disabled via the extension settings option |
- Issue #45: Alignment of If/Else - Issue #96: Allow periods in labels - Issue #99: Corrected Label error with GOTO/GOSUB. - Issue #104: Corrected For/Next with leading label - Issue #105: Changed GOTO scope jumping message from Error to Warning - RegEx: Label comments to include "REM, *, and !" - NEXT can be used without FOR variable.
* RegEx fix for labels with leading spaces. * 98-Issue linting with multiple levels of quoting * RegEx improvement for quoted strings * Replace parenthesis and quoted strings with empty ones. - Removed repetitive Trim()s - Removed unnecessary RegEx tests - Simplified line split on semicolon due to above changes. - Results: Faster execution. Better coverage for split on semicolon * - Cleanup lines[] array at start so repeated test/replace not needed - Removed unnecessary trim()s - Removed boolean equality tests. if(x.test == true) vs if(x.test) - Fixed GOTO/GOSUB when followed by more than one space GOTO <s><s> 100 * RegEx fix-ups to support recent changes * Corrected comment * Linter RegEx cleanup * FOR/NEXT tracking improvements and updated error messages - Nested For/Next statements now validated - NEXT with no variable is now allowed - One line per error: Removed extraneous, repeated diagnostic messages - Reworded / Clarified some error messages for consistency * Minor code clean-up * Replace char-at-a-time split on ; with split(";") * Maintain original character spacing for Intellisense error markers - RegEx improvements and consistency between client and server - Improved getWord() function * Corrected indentation for ELSE END with trailing comment (issue #45) * Corrects Label error with GOTO/GOSUB. Issue #99 - Also now allows dotted numeric labels such as GOTO 100.5 * Revert "Corrects Label error with GOTO/GOSUB. Issue #99" This reverts commit 68b0166. * Inspect TM Scopes->Inspect Editor Token and Scopes * Fix error processing customWordPath when last line is blank. May relate to #24. * Changed GOTO/GOSUB scope jumping message from Error to Warning * Numerous updates related to For/Next and Label tracking - Issue #45: Alignment of If/Else - Issue #96: Allow periods in labels - Issue #99: Corrected Label error with GOTO/GOSUB. - Issue #104: Corrected For/Next with leading label - Issue #105: Changed GOTO scope jumping message from Error to Warning - RegEx: Label comments to include "REM, *, and !" - NEXT can be used without FOR variable. * Shipping 2.0.7 Co-authored-by: Kevin Powick <[email protected]> Co-authored-by: Ian McGowan <[email protected]> Co-authored-by: Peter Schellenbach <[email protected]>
Not sure if you are already aware, but my vscode updated to 2.0.7 today,
and now ALL of my FOR NEXT loops show the error of missing NEXT statement.
Just to double check, I created a new program with just the simple loop
below, and it still shows the error.
FOR X=1 TO 2
PRINT X
NEXT X
[image: Code_g938A9s9Rq.png]
*Brent Blair* <http://www.linkedin.com/in/BrentLBlair>
Vice President of IT
Encompass
Phone 954.474.0300
Fort Lauderdale, FL
<https://www.google.com/maps/place/Encompass+Parts+Distribution/@26.145357,-80.2482168,12.46z/data=!4m5!3m4!1s0x0:0xb2bfe23d3412449!8m2!3d26.0920996!4d-80.2409538>
[email protected]
encompass.com
…On Wed, Jun 10, 2020 at 11:21 AM Kevin Powick ***@***.***> wrote:
For 2.0.7, this scope jumping message from the linter is changed from an
Error to a Warning. As noted, this check can be enabled/disabled via the
extension settings option ignoreGoToScope.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#105 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFRDR4J6GJRTHWMCNET2MDTRV6QGZANCNFSM4NR6DAKQ>
.
|
Brent,
Yes, 2.0.7 was released today. My regular VSCode (not dev) updated but required a reload. I took your code and pasted it into a new document and it does not show any error. I don’t think that it is directly related to the ignoreGoToScope setting because it doesn’t matter if I have this enabled or disabled. I’m not sure what other options you have different from what I have. I am going to check this on a generic system a little later today that hasn’t really had any VS Code configuration customization done and let you know unless Kevin, Mike or someone else replies sooner.
Dick
From: Brent Blair <[email protected]>
Reply-To: mvextensions/mvbasic <[email protected]>
Date: Thursday, June 11, 2020 at 11:41 AM
To: mvextensions/mvbasic <[email protected]>
Cc: Dick Thiot <[email protected]>, Comment <[email protected]>
Subject: Re: [mvextensions/mvbasic] [FEATURE] [was bug] Label jumping out of code block (#105)
Not sure if you are already aware, but my vscode updated to 2.0.7 today,
and now ALL of my FOR NEXT loops show the error of missing NEXT statement.
Just to double check, I created a new program with just the simple loop
below, and it still shows the error.
FOR X=1 TO 2
PRINT X
NEXT X
[image: Code_g938A9s9Rq.png]
*Brent Blair* <http://www.linkedin.com/in/BrentLBlair>
Vice President of IT
Encompass
Phone 954.474.0300
Fort Lauderdale, FL
<https://www.google.com/maps/place/Encompass+Parts+Distribution/@26.145357,-80.2482168,12.46z/data=!4m5!3m4!1s0x0:0xb2bfe23d3412449!8m2!3d26.0920996!4d-80.2409538>
[email protected]
encompass.com
On Wed, Jun 10, 2020 at 11:21 AM Kevin Powick ***@***.***> wrote:
For 2.0.7, this scope jumping message from the linter is changed from an
Error to a Warning. As noted, this check can be enabled/disabled via the
extension settings option ignoreGoToScope.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#105 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFRDR4J6GJRTHWMCNET2MDTRV6QGZANCNFSM4NR6DAKQ>
.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#105 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACOODL26Y3UQORSGKLE6LFDRWECKVANCNFSM4NR6DAKQ>.
|
We use Accuterm to drive VS Code and setup the workspace on the fly. This
is the json file that drives the setup. Hope this helps.
// AccuTerm VSCode Workspace Template
//
// To change the maximum number of items to list from any file,
// change RestFS.MaxItems. To show items in a dictionary level
// file, change RestFS.SelAttr to 208.
{
"folders":[{"uri":"RestFS:/","name":"<ACCOUNT>"}],
"extensions":{"recommendations":["mvextensions.mvbasic"]},
"settings":{
"files.associations":{"*":"mvbasic"},
"files.exclude":{
"**/.git": true,
"**/.vscode": true,
"**/node_modules": true,
"**/pom.xml": true},
"files.eol":"\n",
"MVBasic.ServerName":"<SESSIONID>",
"MVBasic.Account":"<ACCOUNT>",
"MVBasic.RestPath":"http://localhost:3181/mvsvr/restfs",
"MVBasic.indent":3,
"MVBasic.margin":5,
"MVBasic.useCamelCase":false,
"MVBasic.ignoreGotoScope":true,
"MVBasic.UseRestFS":true,
"MVBasic.languageType":"<DIALECT>",
"MVBasic.RestFS.AutoConnect":true,
"MVBasic.RestFS.RestAPI":1,
"MVBasic.RestFS.MaxItems":5000,
"MVBasic.RestFS.SelAttr":32976,
"MVBasic.RestFS.CaseSensitive":<CASE>,
"MVBasic.EditFiles":[
<ITEMS>
]
}
}
}
*Brent Blair* <http://www.linkedin.com/in/BrentLBlair>
Vice President of IT
Encompass
Phone 954.474.0300
Fort Lauderdale, FL
<https://www.google.com/maps/place/Encompass+Parts+Distribution/@26.145357,-80.2482168,12.46z/data=!4m5!3m4!1s0x0:0xb2bfe23d3412449!8m2!3d26.0920996!4d-80.2409538>
[email protected]
encompass.com
On Thu, Jun 11, 2020 at 12:48 PM Dick Thiot <[email protected]>
wrote:
… Brent,
Yes, 2.0.7 was released today. My regular VSCode (not dev) updated but
required a reload. I took your code and pasted it into a new document and
it does not show any error. I don’t think that it is directly related to
the ignoreGoToScope setting because it doesn’t matter if I have this
enabled or disabled. I’m not sure what other options you have different
from what I have. I am going to check this on a generic system a little
later today that hasn’t really had any VS Code configuration customization
done and let you know unless Kevin, Mike or someone else replies sooner.
Dick
From: Brent Blair ***@***.***>
Reply-To: mvextensions/mvbasic ***@***.***>
Date: Thursday, June 11, 2020 at 11:41 AM
To: mvextensions/mvbasic ***@***.***>
Cc: Dick Thiot ***@***.***>, Comment ***@***.***>
Subject: Re: [mvextensions/mvbasic] [FEATURE] [was bug] Label jumping out
of code block (#105)
Not sure if you are already aware, but my vscode updated to 2.0.7 today,
and now ALL of my FOR NEXT loops show the error of missing NEXT statement.
Just to double check, I created a new program with just the simple loop
below, and it still shows the error.
FOR X=1 TO 2
PRINT X
NEXT X
[image: Code_g938A9s9Rq.png]
*Brent Blair* <http://www.linkedin.com/in/BrentLBlair>
Vice President of IT
Encompass
Phone 954.474.0300
Fort Lauderdale, FL
<
***@***.***,-80.2482168,12.46z/data=!4m5!3m4!1s0x0:0xb2bfe23d3412449!8m2!3d26.0920996!4d-80.2409538>
***@***.***
encompass.com
On Wed, Jun 10, 2020 at 11:21 AM Kevin Powick ***@***.***>
wrote:
> For 2.0.7, this scope jumping message from the linter is changed from an
> Error to a Warning. As noted, this check can be enabled/disabled via the
> extension settings option ignoreGoToScope.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <
#105 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AFRDR4J6GJRTHWMCNET2MDTRV6QGZANCNFSM4NR6DAKQ>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<
#105 (comment)>,
or unsubscribe<
https://github.com/notifications/unsubscribe-auth/ACOODL26Y3UQORSGKLE6LFDRWECKVANCNFSM4NR6DAKQ>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#105 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFRDR4MV5RA5QZW3FVU63JLRWEDHBANCNFSM4NR6DAKQ>
.
|
@brentlblair Wow. That is terrible, and I'm sorry. I tested a bunch of sample programs and coding styles, but none where people had no whitespace between their equal signs -- Short of getting out a new release, or hotfix, this problem can be resolved by adding the whitespace around your equal signs. However, I understand this may be a coding style change you do not wish to make. Again, I'm sorry about this. I'll get it fixed-up ASAP and we'll, hopefully, get @itsxallwater to build a hotfix that you can download. |
Yeah we can get a release in to address this quickly. Thanks for jumping on it guys. |
I’m sure it’s not easy to guess all of the different styles for all of the
different flavors of pick. We generally try to avoid extra white space.
With all of the code that we have, I’m sure it’s both ways. Just let me
know when you have a hot fix. As a department we want to use this
exclusively once we get past the false positives. I appreciate what you
guys are doing with this product.
On Thu, Jun 11, 2020 at 1:06 PM Kevin Powick ***@***.***> wrote:
@brentlblair <https://github.com/brentlblair> Wow. That is terrible, and
I'm sorry.
I tested a bunch of sample programs and coding styles, but none where
people had *no* whitespace between their equal signs -- FOR X=1 TO 10 vs FOR
X = 1 TO 10.
Short of getting out a new release, or hotfix, this problem can be
resolved by adding the whitespace around your equal signs. However, I
understand this may be a coding style change you do not wish to make.
Again, I'm sorry about this. I'll get it fixed-up ASAP and we'll,
hopefully, get @itsxallwater <https://github.com/itsxallwater> to build a
hotfix that you can download.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#105 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFRDR4OHR3W4NYYTRTGGEOLRWEFI3ANCNFSM4NR6DAKQ>
.
--
*Brent Blair* <http://www.linkedin.com/in/BrentLBlair>
Vice President of IT
Encompass
Phone 954.474.0300
Fort Lauderdale, FL
<https://www.google.com/maps/place/Encompass+Parts+Distribution/@26.145357,-80.2482168,12.46z/data=!4m5!3m4!1s0x0:0xb2bfe23d3412449!8m2!3d26.0920996!4d-80.2409538>
[email protected]
encompass.com
|
I've opened a new issue #107 for this bug. Again, sorry. Thanks for your understanding. |
Kevin,
Why don’t I see the error in Brent’s code snippet?
Dick
From: Kevin Powick <[email protected]>
Reply-To: mvextensions/mvbasic <[email protected]>
Date: Thursday, June 11, 2020 at 12:24 PM
To: mvextensions/mvbasic <[email protected]>
Cc: Dick Thiot <[email protected]>, Comment <[email protected]>
Subject: Re: [mvextensions/mvbasic] [FEATURE] [was bug] Label jumping out of code block (#105)
@brentlblair<https://github.com/brentlblair>
I've opened a new issue #107<#107> for this bug.
Again, sorry. Thanks for your understanding.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#105 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACOODL33ROLI3AEILXDE4KLRWEHMNANCNFSM4NR6DAKQ>.
|
Sorry if I'm being dense, this ticket is still open too are we leaving it as-is to address a separate issue? |
This was an enhancement request related to Scope Jumping. Unfortunately, we've gone a little OT in the comments, which is why I opened issue #107. Maybe I should close this one and open a new "clean" enhancement request for Scope Jumping? |
I'm good with it. Thanks for staying on point @kpowick! |
* RegEx fix for labels with leading spaces. * 98-Issue linting with multiple levels of quoting * RegEx improvement for quoted strings * Replace parenthesis and quoted strings with empty ones. - Removed repetitive Trim()s - Removed unnecessary RegEx tests - Simplified line split on semicolon due to above changes. - Results: Faster execution. Better coverage for split on semicolon * - Cleanup lines[] array at start so repeated test/replace not needed - Removed unnecessary trim()s - Removed boolean equality tests. if(x.test == true) vs if(x.test) - Fixed GOTO/GOSUB when followed by more than one space GOTO <s><s> 100 * RegEx fix-ups to support recent changes * Corrected comment * Linter RegEx cleanup * FOR/NEXT tracking improvements and updated error messages - Nested For/Next statements now validated - NEXT with no variable is now allowed - One line per error: Removed extraneous, repeated diagnostic messages - Reworded / Clarified some error messages for consistency * Minor code clean-up * Replace char-at-a-time split on ; with split(";") * Maintain original character spacing for Intellisense error markers - RegEx improvements and consistency between client and server - Improved getWord() function * Corrected indentation for ELSE END with trailing comment (issue #45) * Corrects Label error with GOTO/GOSUB. Issue #99 - Also now allows dotted numeric labels such as GOTO 100.5 * Revert "Corrects Label error with GOTO/GOSUB. Issue #99" This reverts commit 68b0166. * Inspect TM Scopes->Inspect Editor Token and Scopes * Fix error processing customWordPath when last line is blank. May relate to #24. * Changed GOTO/GOSUB scope jumping message from Error to Warning * Numerous updates related to For/Next and Label tracking - Issue #45: Alignment of If/Else - Issue #96: Allow periods in labels - Issue #99: Corrected Label error with GOTO/GOSUB. - Issue #104: Corrected For/Next with leading label - Issue #105: Changed GOTO scope jumping message from Error to Warning - RegEx: Label comments to include "REM, *, and !" - NEXT can be used without FOR variable. * Shipping 2.0.7 * Re-introduce accidentally deleted /doc files * Fixes issue 107: FOR/NEXT error when no whitespace after FOR variable. * Shipping 2.0.8 Co-authored-by: Kevin Powick <[email protected]> Co-authored-by: Ian McGowan <[email protected]> Co-authored-by: Peter Schellenbach <[email protected]>
I updated to 2.0.8 and still don’t have an error on the FOR/NEXT loop sample code from Brent, so the update didn’t break something that was working.
From: Mike Wright <[email protected]>
Reply-To: mvextensions/mvbasic <[email protected]>
Date: Thursday, June 11, 2020 at 12:42 PM
To: mvextensions/mvbasic <[email protected]>
Cc: Dick Thiot <[email protected]>, Mention <[email protected]>
Subject: Re: [mvextensions/mvbasic] [FEATURE] [was bug] Label jumping out of code block (#105)
I'm good with it. Thanks for staying on point @kpowick<https://github.com/kpowick>!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#105 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACOODL2AZEPGME4XN7AKWKLRWEJPZANCNFSM4NR6DAKQ>.
|
* RegEx fix for labels with leading spaces. * 98-Issue linting with multiple levels of quoting * RegEx improvement for quoted strings * Replace parenthesis and quoted strings with empty ones. - Removed repetitive Trim()s - Removed unnecessary RegEx tests - Simplified line split on semicolon due to above changes. - Results: Faster execution. Better coverage for split on semicolon * - Cleanup lines[] array at start so repeated test/replace not needed - Removed unnecessary trim()s - Removed boolean equality tests. if(x.test == true) vs if(x.test) - Fixed GOTO/GOSUB when followed by more than one space GOTO <s><s> 100 * RegEx fix-ups to support recent changes * Corrected comment * Linter RegEx cleanup * FOR/NEXT tracking improvements and updated error messages - Nested For/Next statements now validated - NEXT with no variable is now allowed - One line per error: Removed extraneous, repeated diagnostic messages - Reworded / Clarified some error messages for consistency * Minor code clean-up * Replace char-at-a-time split on ; with split(";") * Maintain original character spacing for Intellisense error markers - RegEx improvements and consistency between client and server - Improved getWord() function * Corrected indentation for ELSE END with trailing comment (issue #45) * Corrects Label error with GOTO/GOSUB. Issue #99 - Also now allows dotted numeric labels such as GOTO 100.5 * Revert "Corrects Label error with GOTO/GOSUB. Issue #99" This reverts commit 68b0166. * Inspect TM Scopes->Inspect Editor Token and Scopes * Fix error processing customWordPath when last line is blank. May relate to #24. * Changed GOTO/GOSUB scope jumping message from Error to Warning * Numerous updates related to For/Next and Label tracking - Issue #45: Alignment of If/Else - Issue #96: Allow periods in labels - Issue #99: Corrected Label error with GOTO/GOSUB. - Issue #104: Corrected For/Next with leading label - Issue #105: Changed GOTO scope jumping message from Error to Warning - RegEx: Label comments to include "REM, *, and !" - NEXT can be used without FOR variable. * Shipping 2.0.7 * Re-introduce accidentally deleted /doc files * Fixes issue 107: FOR/NEXT error when no whitespace after FOR variable. * Shipping 2.0.8 * Issue #110: Do not change indentation of comment lines * Issue #111: Added user setting to control indentation of comment lines. * Bump elliptic from 6.5.2 to 6.5.3 (#119) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](indutny/elliptic@v6.5.2...v6.5.3) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update Extension Guide.md Updated AccuTerm connector and host program links. * Feature request 113 (#121) * Update package.json Added MVBasic.customFunctionPath * Update server.ts added functionality to Load CustomFunction definition * Add files via upload * Update Extension Guide.md added documentation for Custom functions and subroutines 6.8 * Update server.ts Removed `data: functions[i].index,` for now since Microsoft has not responded yet. It works without it, and it's no longer in the Microsoft API documentation. * - Fix issue with startLoop/endLoop in server code parser - Clean up unused variable in server - Expand docs on new customFunctions feature * Shipping 2.0.9 Co-authored-by: Kevin Powick <[email protected]> Co-authored-by: Ian McGowan <[email protected]> Co-authored-by: Peter Schellenbach <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brent Blair <[email protected]>
* RegEx fix for labels with leading spaces. * 98-Issue linting with multiple levels of quoting * RegEx improvement for quoted strings * Replace parenthesis and quoted strings with empty ones. - Removed repetitive Trim()s - Removed unnecessary RegEx tests - Simplified line split on semicolon due to above changes. - Results: Faster execution. Better coverage for split on semicolon * - Cleanup lines[] array at start so repeated test/replace not needed - Removed unnecessary trim()s - Removed boolean equality tests. if(x.test == true) vs if(x.test) - Fixed GOTO/GOSUB when followed by more than one space GOTO <s><s> 100 * RegEx fix-ups to support recent changes * Corrected comment * Linter RegEx cleanup * FOR/NEXT tracking improvements and updated error messages - Nested For/Next statements now validated - NEXT with no variable is now allowed - One line per error: Removed extraneous, repeated diagnostic messages - Reworded / Clarified some error messages for consistency * Minor code clean-up * Replace char-at-a-time split on ; with split(";") * Maintain original character spacing for Intellisense error markers - RegEx improvements and consistency between client and server - Improved getWord() function * Corrected indentation for ELSE END with trailing comment (issue #45) * Corrects Label error with GOTO/GOSUB. Issue #99 - Also now allows dotted numeric labels such as GOTO 100.5 * Revert "Corrects Label error with GOTO/GOSUB. Issue #99" This reverts commit 68b0166. * Inspect TM Scopes->Inspect Editor Token and Scopes * Fix error processing customWordPath when last line is blank. May relate to #24. * Changed GOTO/GOSUB scope jumping message from Error to Warning * Numerous updates related to For/Next and Label tracking - Issue #45: Alignment of If/Else - Issue #96: Allow periods in labels - Issue #99: Corrected Label error with GOTO/GOSUB. - Issue #104: Corrected For/Next with leading label - Issue #105: Changed GOTO scope jumping message from Error to Warning - RegEx: Label comments to include "REM, *, and !" - NEXT can be used without FOR variable. * Shipping 2.0.7 * Re-introduce accidentally deleted /doc files * Fixes issue 107: FOR/NEXT error when no whitespace after FOR variable. * Shipping 2.0.8 * Issue #110: Do not change indentation of comment lines * Issue #111: Added user setting to control indentation of comment lines. * Bump elliptic from 6.5.2 to 6.5.3 (#119) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](indutny/elliptic@v6.5.2...v6.5.3) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update Extension Guide.md Updated AccuTerm connector and host program links. * Feature request 113 (#121) * Update package.json Added MVBasic.customFunctionPath * Update server.ts added functionality to Load CustomFunction definition * Add files via upload * Update Extension Guide.md added documentation for Custom functions and subroutines 6.8 * Update server.ts Removed `data: functions[i].index,` for now since Microsoft has not responded yet. It works without it, and it's no longer in the Microsoft API documentation. * - Fix issue with startLoop/endLoop in server code parser - Clean up unused variable in server - Expand docs on new customFunctions feature * Shipping 2.0.9 * Update server.ts It looks like I left the line `customFunctionPath = settings.MVBasic.customFunctionPath;` out of the merge. * Shipping v2.0.10 Co-authored-by: Kevin Powick <[email protected]> Co-authored-by: Ian McGowan <[email protected]> Co-authored-by: Peter Schellenbach <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brent Blair <[email protected]>
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
The text was updated successfully, but these errors were encountered: