Ken, Interesting question. I wrote the following program:
0100 BEGIN
0110 OPEN (1)"*MEMORY*"
0120 OPEN (2)"/tmp/test"
0200 FOR i=1 TO 10
0205 WRITE (1,KEY=STR(i:"00"))i
0210 NEXT i
0215 c=10
0300 SELECT i FROM 1 BEGIN "" END STR(c:"00")
0305 PRINT (2)"I=",i," C=",c
0310 c-=1
0320 NEXT RECORD
If the END is only evaluated once at the beginning then I expect it to read all 10 records, ignoring the new value of C
If the END is evaluated each iteration, then I would expect the program to stop reading somewhere around record 6 or 5.
The results:
I= 1 C= 10
I= 2 C= 9
I= 3 C= 8
I= 4 C= 7
I= 5 C= 6
I= 6 C= 5
I= 7 C= 4
I= 8 C= 3
I= 9 C= 2
I= 10 C= 1
It would appear that the end is only evaluated once at the beginning of the SELECT
Keith