The information in this article applies to:
- Microsoft FoxPro for MS-DOS, versions 1.02, 2.0, 2.5, and 2.5a
SUMMARY
The method used to pass parameters from the MS-DOS prompt to Microsoft
FoxPro for MS-DOS differs between version 1.02 and later versions. Below
are the requirements for each version.
MORE INFORMATION
The following rules apply to FoxPro versions 2.0 and later for MS-DOS:
- Do not enclose Character-type parameters in single quotation marks.
- Separate multiple parameters with a space.
- Each parameter is received in the Character type. Use the conversion
functions when parameters have other types.
- If an application is invoked in the FoxPro command line, the
application must begin with a PARAMETERS statement.
For example, in FoxPro 2.0 and later, use the following command
from the MS-DOS prompt:
FOXPROL test.prg hello 24 01/01/89 .T.
The contents of TEST.PRG are listed below:
Test.prg && For FoxPro 2.0 and 2.5
parameters x,y,z
wait window "This is parameter 1: "+x
wait window "This is parameter 2: "+y
wait window "This is parameter 3: "+z
The following rules apply to FoxPro version 1.02 for MS-DOS:
- Enclose character type parameters in single quotation marks.
- The WITH keyword must be used when starting FoxPro.
- Use a comma to separate multiple parameters.
- Any type of parameter (logical, numeric, and so on) can be used.
For example, in FoxPro 1.02 use the following command from the
MS-DOS prompt:
FOXPROLN test.prg WITH 'hello', 24, {01/01/89}, .T.
The contents of TEST.PRG are listed below:
Test.prg && For FoxPro 1.02
parameters x,y,z
wait window "This is parameter 1: "+x
wait window "This is parameter 2: "+str(y)
wait window "This is parameter 3: "+DTOC(z)
REFERENCES
For information about passing parameters from Windows to FoxPro for
Windows, query on the following words here in the Microsoft Knowledge Base:
passing and parameters and foxpro and windows and character
|