B.17 system, run, pause and eval statements

The statements documented in this section are used to provide access to the machine’s operating system’s command shell, control program flow or pause execution. Although these statements have very little in common, all of them are likely to be used only by advanced users and, therefore, they are presented together in the following table.


Arguments and performed function


This function submits the contents of string s for execution to the machine’s command line shell and waits for it to return. Any output from the system’s command line shell is directed to the BayES console.

Under Microsoft® Windows® the string "cmd /Q /C " is prepended to s. See section 3.9 for more details.

  • s must be a string with value equal to a complete statement in the machine’s command-line language


Executes the statements contained in the script file, the location and name of which are provided by string s. Once a run statement is encountered, a new workspace is created and program flow jumps to the first statement in the file. That is, statements contained in the script file do not have access to the items in the calling workspace and any items created during execution of these statements are deleted from memory once execution of the last statement in the script file completes.

  • s must be a string
  • s could be absolute (eg. "C:/Files/MyScript.bsf") or relative to the current working directory (eg. "./MyScript.bsf")

see also eval


Executes the statement contained in string s. During execution of the statement in s the BayES parser has access to the items in the calling workspace and any items created by executing s are stored in the calling workspace. s could contain multiple statements.

  • s must be a string
  • s must consist of complete BayES statement(s)

see also run


Pauses execution of the current script for i milliseconds. If i is non-positive then this function has no effect.

  • i must be an integer

Share this content:
Facebook Twitter LinkedIn Email
© 2016–20 Grigorios Emvalomatis