Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LOOP IN 'FOR.. ENDFOR' problem
Message
From
27/10/2004 10:21:25
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00954844
Message ID:
00954863
Views:
12
Hey - Hey

Got rid of LOOP in a For ... Next. Chalk up 1 for the supporters of thread "Argument starter - The roots of all evil" :-)

Terry

>I would rearange code as follows and try.
select mytable
>for i=1 to 10
>	DO CASE
>	CASE NOT seek(i,'mytable','id')
>		messagebox('ID '+allt(str(i))+' Not Found!',0+16)
>	CASE mytable.status='C'
>		messagebox('The operation will ignore from tube ID '+allt(str(i)))
>	OTHERWISE
>		insert into mycursor value(i)
>	ENDCASE
>endfor
>
>
>>I have the following code:
>>
>>select mytable
>>for i=1 to 10
>>if seek (i,'mytable','id')=.f.
>>messagebox('ID '+allt(str(i))+' Not Found!',0+16)
>>return
>>endif
>>if mytable.status='C'
>>messagebox('The operation will ignore from tube ID '+allt(str(i)))
>>loop
>>endif
>>insert into mycursor value(i)
>>
>>The problem is that the code ignore from my 'Loop' (the id inserted even mytable.status='C')
>>Who can help me?
- 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
Next
Reply
Map
View

Click here to load this message in the networking platform