Hi

I want to pass a parameter to my VFP EXE such as running it like

MyApp.EXE /s /

How can I do this? I am using a .PRG as my "main". I tried using PARAMETER on the first line of my "main".PRG but I can't use the "/" switch. It gives me a "datatype mismatch".

Please help

ALC

Re: Passing parameter to an EXE by Fred

Fred
Thu Mar 04 21:16:49 CST 2004

All parameters will be passed as character, and any unused parameters will
have a value of .F. in VFP. If you use the "/" character, you'll have to
parse it out of the character string that was passed. In your example,
you'd have two parameters, and the content of your first parameter would be
"/s" and the second would be "/v". A space is the command line delimiter
between parameters.

Fred
Microsoft Visual FoxPro MVP


"ALC" <anonymous@discussions.microsoft.com> wrote in message
news:948D28A6-8A0E-4BAB-B9A6-DADBE37EB89B@microsoft.com...
> Hi,
>
> I want to pass a parameter to my VFP EXE such as running it like:
>
> MyApp.EXE /s /v
>
> How can I do this? I am using a .PRG as my "main". I tried using
PARAMETER on the first line of my "main".PRG but I can't use the "/" switch.
It gives me a "datatype mismatch".
>
> Please help.
>
> ALC