Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Evaluate
Message
De
29/06/2003 11:52:04
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
29/06/2003 10:33:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00805082
Message ID:
00805105
Vues:
23
>2. The example working but the principle not enough clear for me.
>Can you help me?

Searching one of my projects for "eval", I find additional examples:

1) Get the expression for an index. This can help you check for duplicate values, or check for referential integrity before VFP does.
? key() && gets the index expression for the current index
? eval(key()) && gets the value that is saved in the index.
* Searching for this value can be used to check for duplicates.
2) For my Text Report (see download #9991), I used eval() to check when a break expression changes (so that the report prints headers and footers when an expression changes).

3) Get the value from a field when the fieldname is stored in a variable. Example:
MyField = "ArticleName"
? MyField && shows: "ArticleName"
? eval(MyField) && shows the content of the field ArticleName
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