Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tables
Message
De
13/06/2004 17:27:08
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
13/06/2004 16:42:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Tables
Divers
Thread ID:
00913185
Message ID:
00913269
Vues:
15
>hello,
>thank you very very much,
>it works very well.
>i want to ask, you used For i think we need Endfor,
>but it works, this is like vb.
> any way thanks again.
>regards.
for ...
  ...
endfor
and
for ...
  ...
next
are equivalent.

From the help:
FOR Var = nInitialValue TO nFinalValue [STEP nIncrement] 
  Commands
  [EXIT]
  [LOOP]
ENDFOR | NEXT
In a syntax summary such as this one, the vertical line, ENDFOR | NEXT, means that you have to use one of the two. (By the way, the symbols around EXIT, LOOP and STEP mean that those parts of the command are optional.)

Both NEXT and ENDFOR are valid. If you only use VFP, ENDFOR is more logical, since other control structures have comparable endings (do...enddo, scan...endscan, etc.) NEXT is more familiar to people who are accustomed to some other programming languages (especially BASIC, I think).

I didn't do much work in BASIC, but somehow I got accustomed to using ENDFOR instead of NEXT.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform