Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to display parameters passed?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01012215
Message ID:
01012249
Vues:
28
>Hi, Nadya.
>
>>I wanted to display values of all passed parameters in a program. Something like:
>>
>>lnParms = aparameters(laParameters)
>>for lnI = 1 to lnParms
>>  =messagebox(laParameters[m.lnI,1] + " value: " + transform(laParameters[m.lnI,2]))
>>next
>>
>
>Not nice, but... what about:
>
>
>MyFunction( 1, "2", 3 )
>
>Function MyFunction( tx1, tx2, tx3 )
>
>For q=1 to Pcount()
>	? "tx"+Transform(q) +" =  "+ Transform( Evaluate( "tx"+Transform(q) ) )
>Next
>
In your case you know name of the parameters in advance. I want to make it generic, e.g. it should not rely on specific naming convention. In C we can access an array of parameters. It would be nice to have the same in VFP.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform