Skip to main content

Examples

rascal-0.34.0
rascal-tutor-0.18.4

Synopsis

Examples to illustrate the concept.

Syntax

#### Examples

_MarkedText_

Description

Gives a number of simple but complete examples to illustrate the concepts and its variations. Running examples are preferred.

Examples

Typically, examples would included executed code:

```rascal-shell
import IO;
println("Hello World!")
```

to show this:

rascal>import IO;
ok
rascal>println("Hello World!")
Hello World!
ok

Benefits

  • Examples make documentation concrete and to the point.
  • Examples can be copied by users and adapted for further exploratory learning.
  • Code examples are checked by the tutor compiler for correctness (no exceptions or errors)

Pitfalls

  • Code examples have to be maintained