How are command line parameters passed/used? 
Author Message
 How are command line parameters passed/used?

Is there a way to pass command line parameters to .EXE's created by FP2.5?
For example, if I type:              

                MYPROG -ABC SOMEFILE.TXT

How do I get MYPROG.EXE to recognize "-ABC" and "SOMEFILE.TXT"?

Thanks in advance.



Fri, 15 Nov 1996 13:12:20 GMT  
 How are command line parameters passed/used?
: Is there a way to pass command line parameters to .EXE's created by FP2.5?
: For example, if I type:              

:                 MYPROG -ABC SOMEFILE.TXT

: How do I get MYPROG.EXE to recognize "-ABC" and "SOMEFILE.TXT"?

In the main program of your project, add the following as the first line
of executable (non-comment) code:

  PARAMETER parm1, parm2, parm3, parm4, parm5, parm6 && or even more

Before issuing the first call to another procedure or UDF, execute the
following line of code:

  CmdLnArgCnt = PARAMETERS()

CmdLnArgCnt now contains the number of parameters passed in, and
parm1...n will contain the arguments as character strings, or will be
logicals with a value of .F. if no argument is passed.  Works for me at
least! <g>  You'll have to write your own code to process the command
line arguments and convert to other than character strings as necessary.
--
Ed Rauh            | Lord, give me the serenity to accept the things I
Weatherhill, Inc.  | cannot change, the courage to change the things I
(V) 203/459-5093   | can, and the wisdom to successfully hide the bodies
(F) 203/459-5095   | of those who{*filter*}me off.



Fri, 15 Nov 1996 17:19:42 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Passing command line parameters to a VFP EXE

2. Passing command line parameters project EXE

3. Passing parameter to VFP on Command Line

4. Passing parameters when using the Run command

5. ! /N RUN command parameter passing

6. vfp6 command line parameters???

7. Command line parameters

8. Frustrated by command line parameters in visual foxpro 5

9. Foxpro 2.6 Debugger, Starting with Command Line Parameters

10. Command Line parameters

11. Command Line Parameters

12. vfp6 command line parameters???

 

 
Powered by phpBB® Forum Software