Skip to content

Output Statements

Output statements are used to evaluate an expression and inspect its results. Unlike when using assignments, the results cannot be reused. However, it is also not necessary to think of unique names for placeholders, which saves time and keeps the namespace clean.

The next snippet shows how the singular result of an expression (the loaded Table) can be inspected:

out Table.fromCsvFile("titanic.csv");

This output statement has the following syntactic elements:

  • The keyword out, which indicates that we want to inspect the results of an expression.
  • The expression to evaluate.
  • A semicolon at the end.

Inspecting values requires a working installation of the Safe-DS Runner. Follow the instructions in the installation guide to install it. Afterward, you can inspect values of various types via code lenses in the editor, as explained for assignments.