Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FOR ... ENDFOR loop
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00552168
Message ID:
00552306
Vues:
12
>Hi all,
> I have a group of fields, five in all that I need to go through sequentially. I have a for loop that that I thought would do this. They are named note1 through note5. I am trying to use something along the lines of:
>
>FOR i = 1 to 5
> DO CASE
> CASE note(i)
> myCode
> ENDCASE
>ENDFOR
>
>What is wrong with this picture?
>Thanks

Just add the following line outside your loop
SCATTER FIELDS note1, note2, note3, note3, note4 TO note

or

SCATTER FIELDS LIKE note* tO notes
SCATTER FIELDS LIKE note? tO notes

depending on your pleasure.

Also check out the following functions AFIELDS(), FIELD() for more.

As you can see from the many responses there are many ways to skin the fox.

regards,

costas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform