[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
RUN
. Summary
run(str <filename>, str <comline>, int <mode>);
. Description
The run function executes the indicated file. The indicated file
must either be in the current directory, be on the DOS PATH, or must
include the full path to the file (i.e., specify the drive and/or
directory). Make sure that if you run a program that expects user
input you are on hand to give it. The <comline> parameter is the
command line which should be passed to the called program. The
<mode> argument specifies several options, as follows:
0 Original screen is restored when program is completed.
1 When program is completed, the user is prompted to press a
key and screen is restored as soon as it is pressed.
2 Original screen is not restored when program is completed
This function is similar to the dos function. Because it uses less
memory and loads faster, it is preferable to that function unless a
DOS Batch file has to be run, or an internal DOS command must be
specified, in which case the dos function has to be used.
. Return Value
The run function returns a -1 if the file can not be run (because it
can not be found or there is not enough memory). Any other value is
the value returned by the called program (usually 0), but a positive
value may also result when the called program is aborted.
. Example
run("CS test", 1);
See Also:
dos
dosfunction
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson