Purpose
Execute an
external program.
Synopsis
procedure system(command:string|text)
Argument
command
|
The command to be executed
|
Example
The following displays the functionality of the
mmsystem module using the program
mosel:
system('mosel -s -c "exam mmsystem"')
Further information
1. The given program is executed directly: if the specified expression is a shell command, it is necessary to call the shell explicitly. For instance to get a directory listing under Windows the command will be
"cmd /C dir".
2. Using this procedure should be avoided in applications that are to be run on different systems because such a call is always system dependent and may not be portable.
3. The generated process inherits the current system environment plus the environment variables modified/created using the
setenv procedure.
4. On Windows the program to execute is located using the current process environment, as a consequence any modification of the
PATH environment variable or working directory has no effect on finding this executable. The behaviour is different on Posix systems where the search for the program to execute is performed from the subprocess environment.
5. The default output and error streams of the generated process are redirected to the corresponding Mosel streams. The default input stream is closed.
7. When Mosel is running in restricted mode (see Section
mosel command: restricted mode), the restriction
NoExec disables this routine unless the environment variable
MOSEL_EXECPATH
is defined. This variable, used in a similar way as the
PATH environment variable, gives a list of paths than can still be used under the restriction. In addition to directories, the definition of the variable may include paths to executables such that it may directly specify a list of programs. It is also worth noting that no search is performed (
i.e. executables must be given with their full path) and that path expansion is performed a the time of loading
mmsystem relative to the Mosel initial working directory.
Module
© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the
property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not
convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except
solely for internal evaluation purposes to determine whether to purchase a license to the software
described in this documentation, or as otherwise set forth in a written software license agreement
between you and FICO (or a FICO affiliate). Use of this documentation and the software described in
it must conform strictly to the foregoing permitted uses, and no other use is permitted.