Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do_while?
Message
De
11/06/2004 12:52:49
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Do_while?
Divers
Thread ID:
00912788
Message ID:
00912788
Vues:
60
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
Fil
Voir

Click here to load this message in the networking platform