26 Miscelleanous System Support: System

# 26 Miscelleanous System Support: `System`

The `System` module contains procedures providing functionality related to the Mozart Engine.

## 26.1 System Control

`gcDo`

  > `{System.gcDo}`

  Invokes garbage collection.

## 26.2 Printing

The procedures to print values and virtual strings choose the output device for the printed text as follows:

1. If Mozart is running standalone, the standard output or standard error device is chosen (depending on the procedure).

2. Otherwise the Oz Programming Interface is chosen as output device.

The procedures explained here differ from those provided by `Open` and `OS` in that they can be used to print information in subordinated computation spaces to support debugging.

`print`

  > `{System.print` `X``}`

  The current information on `X` is printed without a following newline.

  The output is limited in depth and width by system parameters that can be configured either by the Oz Panel (see ``Oz Panel'') or by `Property.put` (see Chapter 22).

  A width of means that for lists at most elements and for records at most fields are printed, the unprinted elements and fields are abbreviated by `,,,`. A depth of means that trees are printed to a depth limit of only, deeper subtrees are abbreviated by `,,,`.

  The printed text appears on standard output.

`show`

  > `{System.show` `X``}`

  The current information on `X` is printed with a following newline.

  The output is limited in depth and width as with `System.print`.

  The printed text appears on standard output.

`printError`

  > `{System.printError` `V``}`

  Prints the virtual string `V` without a newline.

  The printed text appears on standard error.

`showError`

  > `{System.showError` `V``}`

  Prints the virtual string `V` followed by a newline.

  The printed text appears on standard error.

`printInfo`

  > `{System.printInfo` `V``}`

  Prints the virtual string `V` without a newline.

  The printed text appears on standard output.

`showInfo`

  > `{System.showInfo` `V``}`

  Prints the virtual string `V` followed by a newline.

  The printed text appears on standard output.

## 26.3 Miscellaneous

`eq`

  > `{System.eq` `X``` `Y``` `?B``}`

  Tests whether `X` and `Y` refer to the same value node in the store.

`nbSusps`

  > `{System.nbSusps` `X``` `?I``}`

  Returns the number of suspensions on `X`, that is the number of threads and propagators that suspend on `X`.