Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unlimited number of parameters
Message
From
26/01/2005 18:02:08
 
 
To
26/01/2005 17:56:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00981000
Message ID:
00981003
Views:
33
>I have an application that will receive an unlimited number of parameters. In VB.NET, I can have:
>
>
>    Sub Main(ByVal CmdArgs() As String)
>
>
>to define the entry parameters and have as much as I want.
>
>But, in VFP, I don't know if the same can be obtained. Is the only way to define, for exemple, up to 20 parameters, and verify each of them until I find one that is not passed? This approach would be like creating a long buffer of parameters in order to respond to an unlimited number of parameters being passed. Is that the only way or there is a VB.NET like mechanism?

I don't know of any other way in VFP. All command line parameters to VFP will be passed as character, so you could use a naming convention and "build" your parameter name in a loop to check for the first one that contains a logical .F. for it's value. The one before that (eg: the last one that's of type character) is the last actual passed parameter.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform