Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looping through field names
Message
De
03/07/2007 09:15:10
Mike Yearwood
Toronto, Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01237070
Message ID:
01237382
Vues:
18
>You don't need alias in this case
>
>For I = 1 to FCOUNT()
>	If not EMPTY(EVALUATE(FIELD(m.I)))
>		....
>	Endif
>EndFor
>
True, but IMO it's safer. I would normally include it in the fcount() allowing this code to be moved to a separate UDF or elsewhere in the PRG.

>
>>Interesting. I wouldn't have thought of using force extension to make the field the extension of the alias. How about this:
>>
>>
>>m.lcAlias = ALIAS() + "."
>>For I = 1 to FCOUNT()
>>  If not EMPTY(eval(m.lcAlias + FIELD(m.I)))
>>      ....
>>  Endif
>>EndFor
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform