Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BOF() Identifier
Message
 
 
To
02/10/2004 18:51:44
Mike Smith
Doncaster Office Services
Oakville, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Miscellaneous
Thread ID:
00948259
Message ID:
00948268
Views:
13
Hi Mike,

I don't see why this loop shouldn't end and it does when I run you code.
CREATE CURSOR test (f01 N(3))
FOR i=1 to 3
	INSERT INTO test VALUES (i)	
ENDFOR
go bottom
j = 1
do while not bof()
	skip -1
	j = j + 1
	? f01, j
enddo
However, your code has a bug because it skips the first record when it starts. The 'SKIP -1' should be the last line in the loop for the reverse scan to work properly.
GO BOTTOM
do while not bof()
	***skip -1
	j = j + 1
	? j
	SKIP -1
enddo
>
>Try this:
>
>set excape on
>
>use Myfile in 0
>select myfile
>
>go bottom
>j = 1
>do while not bof()
>skip -1
>j = j + 1
>enddo
>jst = alltrim(str(j))
>wait window "Records = &jst"
>
>My experience with this in VFP 6.0 and 8.0, is a never ending loop that requires escape to stop.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform