Skip to content

Statements

Statements are used to run some action. Safe-DS only has three type of statements:

  • Expression statements evaluate an expression and discard any results. They are only useful if the expression has side effects, such as writing to a file.
  • Assignments also evaluate an expression, but then store results in placeholders. This allows reusing the results multiple times without having to recompute them.
  • Output statements evaluate an expression as well, and provide options to inspect its results. Unlike when using assignments, the result cannot be reused.