×
Menu
Index

EXEC Subroutine

 
Usage:
EXEC(s[,f])
 
Description:
Executes a shell command. The string s can be any valid shell command. Returns the return code (errorlevel) of the command. The optional f parameter determines the format used to pass the parameters to external programs. It was added to maintain backwards compatibility. By default (or zero) the parameters are parsed by exec and then passed to the program, otherwise if set to one (1) the raw non-parsed parameters are passed.
 
Example:
sub main()
   exec("program ^"^"param one^"^"" ---param2) // old format
   exec("program ^"param one^" --param2", 1)   // new format is easier
   exec("script.tbs")
   exec("shellcommand")
end sub