If you run a program from the command line, the operating system searches directories listed in the PATH environment variable to find the executable file you have requested.
You can also run your program by specifying the complete path of the executable file. On Windows* operating systems, any DLLs you are using must be in the same directory as the executable or in one specified in the path.
If your program is multithreaded, each thread starts on whichever processor is available at the time. On a computer with one processor, the threads all run in parallel, but not simultaneously; the single processor switches among them. On a computer with more than one processor, the threads can run simultaneously.
If you specify the -fpscomp filefromcmd (Linux OS and Mac OS X) or /fpscomp:filesfromcmd (Windows OS) option, the command line that executes the program can also include additional filenames to satisfy OPEN statements in your program in which the filename field (FILE specifier) has been left blank. The first filename on the command line is used for the first such OPEN statement executed, the second filename for the second OPEN statement, and so on. (In the Visual Studio IDE, you can provide these filenames using Project>Properties. Choose the Debugging category and enter the filenames in the Command Arguments text box.)
Each filename on the command line (or in an IDE dialog box) must be separated from the names around it by one or more spaces or tab characters. You can enclose each name in quotation marks ("filename"), but this is not required unless the argument contains spaces or tabs. A null argument consists of an empty set of quotation marks with no filename enclosed ("").
The following example runs the program MYPROG.EXE from the command line:
MYPROG "" OUTPUT.DAT
Because the first filename argument is null, the first OPEN statement with a blank filename field produces the following message:
File name missing or blank - please enter file name UNIT number ?
The number is the unit number specified in the OPEN statement. The filename OUTPUT.DAT is used for the second such OPEN statement executed. If additional OPEN statements with blank filename fields are executed, you will be prompted for more filenames.
Instead of using the -fpscomp filesfromcmd or /fpscomp:filesfromcmd option, you can:
Call the GETARG library routine to return the specified command-line argument. To execute the program in the Visual Studio IDE, provide the command-line arguments to be passed to the program using Project>Properties. Choose the Debugging category and enter the arguments in the Command Arguments text box.
On Windows OS, call the GetOpenFileName Windows API routine to request the file name using a dialog box.
For more information, see the following topic:
fpscomp compiler option
Copyright © 1996-2010, Intel Corporation. All rights reserved.