Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can this Case Statement Exit Prematurely
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
FoxPro Dos
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01261292
Message ID:
01261423
Views:
8
>I have seen that once before, I retyped the code in and it was OK, possibly a nonprintable character or something, just a WAG.

Not as non-printable as my language whenever I have to debug this arcane, labrynthine code (this bit is just a few inches of yards and yards of in-line code that has meaningless var names, vars that suddenly appear and you don't know whether they've just been created on-the-fly or they're global in scope, a dearth of comments or explanation of what's going on - and then only little comments to himself at the time. BTW, this case is immediately followed by another that has the same problem.

>
>Bob
>
>>Hi
>>
>>Struggling through the "bane of my life" gibberish code again that has been my lot to maintain (not mine BTW!)
>>Have been watching the following CASE in debug (using VFP7 to follow FPD2.6 code). I know that it doesn't satisfy the 1st 2 cases, and watch it skirt these, then it suddenly shoots to the EndCase, ignoring the other two cases. There are 2 similar secytions where it does this too.
>>
>>Anyone any ideas how this can be?
>>
>>'ppreciate it
>>
>>Terry
>>
>>
>>do case   && journey's
>>
>>  case empty(j_start) .and. empty(j_end) .and. empty(j_andor)
>>     * do nothing
>>
>>  case j_andor="OR" .and. !empty(j_start)
>>     * but test that both times are not empty
>>     if empty(j_end)  && ignore the OR
>>        expr=expr+".and."+ opjrny+j_start
>>     else
>>        expr=expr+".and. ("+opjrny+j_start+".or." ;
>>           +opjrny+j_end+")"
>>     endif
>>
>>  case j_andor="OR" .and. empty(j_start)
>>     * ignore the OR
>>     if !empty(j_end)
>>        expr=expr+".and."+opjrny+j_end
>>     endif
>>
>>  case empty(j_andor)
>>     if !empty(j_start)
>>        expr=expr+".and."+ opjrny+j_start
>>     endif
>>     if !empty(j_end)
>>        expr=expr+".and."+ opjrny+j_end
>>     endif
>>endcase
>>
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Reply
Map
View

Click here to load this message in the networking platform