I'm getting a Nesting Error message in a situation where I'm trying to use EXIT to escape from a CASE statement. The EXIT command is shown at the bottom of the help page for DO CASE in VFP8, but the description of the EXIT command only talks about DO WHILE, FOR, and SCAN loops.
My code looks something like this:
DO CASE
CASE Blah_Blah
lnX = 50
IF lnX > 10
EXIT
ENDIF
lnY = 30
CASE Blah_Blah_Blah
....
ENDCASE
I was expecting it to jump past the ENDCASE statement when it hit the EXIT command, but I'm getting a Nesting Error instead.
I'm trying to avoid pages and pages of 6-level indents that are tricky to keep track of and still have some semblance of structure.
Any observations? -- Dick![[machinegun] [machinegun] [machinegun]](/data/assets/smilies/machinegun.gif)
My code looks something like this:
DO CASE
CASE Blah_Blah
lnX = 50
IF lnX > 10
EXIT
ENDIF
lnY = 30
CASE Blah_Blah_Blah
....
ENDCASE
I was expecting it to jump past the ENDCASE statement when it hit the EXIT command, but I'm getting a Nesting Error instead.
I'm trying to avoid pages and pages of 6-level indents that are tricky to keep track of and still have some semblance of structure.
Any observations? -- Dick
![[machinegun] [machinegun] [machinegun]](/data/assets/smilies/machinegun.gif)