Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to display parameters passed?
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01012215
Message ID:
01012249
Views:
26
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform