Re: Command Line parameter for executible
- From: "Rick Bean" <rgbean@xxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 24 Oct 2005 14:54:20 -0400
Yes,
Just declare as many parameters as you may include in the command line and then place a PARAMETERS statement in your Main program. e.g.
* MAIN.PRG
PARAMETERS p_c1, p_c2
If pcount() > 0 && Check for parameters
IF pcount() >1
Option2 = p_c2 && Got Both
ELSE
Option2 = "" && Just the first
ENDIF
Option1 = p_c1
ELSE && Neither
Option1 = ""
Option2 = ""
ENDIFNote: All parameters will come in a strings, and a space will signal the end of a parameter, unless it's inside of quotes ("")
Rick
<richmarin@xxxxxxxxxxxxx> wrote in message news:1130167518.636492.46850@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am using Foxpro 5.0.
I wanted to start an executible with a parameter. For example,
MyApplication.exe /Monday
So, if the code sees the exe alone. It acts one way, however, if it sees Monday, the code executes another set of instructions.
I can pass parameters to executibles with Visual Basic. Can I do the same thing in Foxpro ?
..
.
- Follow-Ups:
- Re: Command Line parameter for executible
- From: Dan Freeman
- Re: Command Line parameter for executible
- References:
- Command Line parameter for executible
- From: richmarin
- Command Line parameter for executible
- Prev by Date: Command Line parameter for executible
- Next by Date: Re: Command Line parameter for executible
- Previous by thread: Command Line parameter for executible
- Next by thread: Re: Command Line parameter for executible
- Index(es):
Relevant Pages
|
|