Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro Substitution Fails
Message
De
18/03/2003 15:47:42
 
 
À
18/03/2003 15:37:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00767234
Message ID:
00767249
Vues:
15
I guess I'm missing something but I still don't see why you would need macro substitution.

>Hi Sergey,
>I know that in THAT case I do not need macro substitution, but I used that just as an example. In reality, the value in getfield will change to a different field name and the wordhide program will pull the value from the correct field in the table depending on the fieldname that is passed to it. So I need to use macro substitution so I can use one variable name: getfield throughout a procedure and only change the field name ONCE and store it in the variable getfield.
>
>
>getfield='prof_sc'
>value1 = WORDHIDE(&getfield)
>?value1
>
>*wordhide function xstr param should = 'prof_sc' in this example only
>FUNCTION wordhide
>PARAMETERS xstr
>set step on
>? xstr
>IF LOWER(xstr)='prof_sc'
>	RETURN 'mdr_dob'
>ELSE
>	RETURN 'unknown - prof_sc was not passed to this program'
>ENDIF
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform