>>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
>>
>> 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)
>> 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
>>
>
>Just j_andor isn't equal to [OR] and it is not empty. If it is equal to [AND] none of these will be satisfied.
Not sure I get you there BB. However, the point is that I do not see the cursor/pointer visit either of the last 2 cases, after evaluating the 1st 2, in order to evaluate whether no case is satisfied.
- 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.