Information générale
Catégorie:
Codage, syntaxe et commandes
hi,
I tried using "do while" command and it seems to be a bit strange for me but I would like to understand how it works. I used this code:
Create Cursor temp (int1 i, num1 n(4,0))
DO WHILE recno() < 10
Insert Into temp (int1, num1);
Values (RECNO(),RecNo()*10)
ENDDO
My questions are:
- How can this command skip on to the next record of the cursor,I mean, what makes it skip? The same recno should fill up the cursor.
- In the cursor the first record is duplicated. why? (if I put "skip" just before "enddo" the first record is not duplicated - it works as it should)
- I looked up all the helps(Hentzen's book, VFP help, MSDN, UT) but I've not found any source for that. Any help?
Thanks
Tamás Szigeti
Suivant
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