User guide

D-27
Compiler Directives and System Tasks
Commands
$system
Executes operating system commands. Syntax:
$system("command");
Code example:
$system("mv -f savefile savefile.1");
$systemf
Executes operating system commands and accepts multiple
formatted string arguments. Syntax:
$systemf("command %s ...","string",...);
Code example:
int = $systemf("cp %s %s", "file1", "file2");
The operating system copies the file named file1 to a file named
file2.
System Tasks for Log Files
$log
If a filename argument is included, this system task stops writing
to the vcs.log file or the log file specified with the -l runtime option
and starts writing to the specified file. If the file name argument is
omitted, this system task tells VCS to resume writing to the log
file after writing to the file was suspended by the $nolog system
task. Syntax:
$log[("filename")];
Code example:
$log("reset.log");