Can I start the SCAN from a specific index instead of always from the TOP?
By design the SCAN command always starts from the first element of the cursor, so this doesn't work
Everytime I needed to skip an element I always had to resort to keeping a counter or something ugly:
Is there a proper way in VFP to specify where SCAN should start?
Or is there a way to make SCAN set the current index he is looping to a variable (and not having to keep a counter myself)?
Thank you,
Emanuele.
By design the SCAN command always starts from the first element of the cursor, so this doesn't work
Code:
SELECT _cursor
GO 2
SCAN
? _cursor.id
ENDSCAN
Everytime I needed to skip an element I always had to resort to keeping a counter or something ugly:
Code:
LOCAL counter
counter = 0
SELECT _cursor
SCAN
counter = counter + 1
If counter == 1 Then
SKIP
EndIf
? _cursor.id
ENDSCAN
Is there a proper way in VFP to specify where SCAN should start?
Or is there a way to make SCAN set the current index he is looping to a variable (and not having to keep a counter myself)?
Thank you,
Emanuele.