Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get a fieldname from its position
Message
De
03/06/2005 07:57:41
Jim Winter
Jim Winter Consulting
Hinesburg, Vermont, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Database:
Visual FoxPro
Divers
Thread ID:
01019645
Message ID:
01019773
Vues:
17
>>Often I need to read the value of the nth field of a table or cursor without knowing the fieldname in advance. I use the following code to read the value of the 3rd field in a cursor called c1 for example:
>>
>>local ar[1]
>>afields(ar,'c1')
>>? c1.&ar[3,1]
>>release ar
>>
>>Is there a simpler way?
>>Thanks
>
>
? EVAL("c1." + FILED(i, "c1"))
Sergey,
?EVAL(FIELD(3,"c1"))
seems to work also.

Regards,
Jim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform