Information générale
Catégorie:
Codage, syntaxe et commandes
Thanks for your answer but if the INSERT sould do what you said, then in the following example the "SKIP" should make every second record leave out.
Create Cursor temp (int1 i, num1 n(4,0))
DO WHILE recno() < 10
Insert Into temp (int1, num1) Values (RECNO(),RecNo()*10)
SKIP
ENDDO
It is because when the recno() is evaluated first and the INSERT fills the first record and moves the record pointer to the next one, the SKIP should moves the record pointer to the following record so the actual record pointer is now on the the third record. Am I thinking right?
No.
INSERT fills the first record and moves the record pointer to the next one
- VFP evaluate the INSERT VALUES
- go to the RECCOUNT()+1 position
- add a record with the values.
- the record pointer is not move
the SKIP should moves the record pointer to the following record so the
actual record pointer is now on the the RECCOUNT()+1 record.
Fa
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement