CREATE TABLE c:\temp\temp FREE (Name C(10),Address C(10))
* --- Populate Table with Test Values ---
FOR Cntr = 1 To 6
APPEND BLANK
IF MOD(RECNO(),2) = 0
* --- Even Records ---
REPLACE Name WITH "John";
Address WITH "Addr" + STR(Cntr,2)
ELSE
* --- Odd Records ---
REPLACE Name WITH "Bill";
Address WITH "Addr" + STR(Cntr,2)
ENDIF
ENDFOR
* --- Now Reverse The Sequence ---
FOR Cntr = 7 To 12
APPEND BLANK
IF MOD(RECNO(),2) = 0
* --- Even Records ---
REPLACE Name WITH "Bill";
Address WITH "Addr" + STR(Cntr,2)
ELSE
* --- Odd Records ---
REPLACE Name WITH "John";
Address WITH "Addr" + STR(Cntr,2)
ENDIF
ENDFOR
INDEX ON Name + STR(MOD(RECNO(),2)) UNIQUE TAG S1
BROWSE