ID: Q92971
The information in this article applies to:
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.
The following rules apply to FoxPro versions 2.0 and later for MS-DOS:
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
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)
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
Additional reference words: FoxDos 2.00 2.50 2.50a
KBCategory: kbprg
KBSubcategory:
Last Reviewed: April 17, 1995