Fandango Tutorial#

Welcome to Fandango! In this tutorial, you will learn how to

  • write Fandango specs

  • use the fandango command-line tool

  • test programs with Fandango.

Conventions in this Documentation#

Shell Commands#

Fandango is mostly operated via the command line. A command fandango help is shown as follows:

$ fandango help

Note

In this tutorial, a $ at the beginning of a command stands for your input prompt. Do not enter it yourself.

Tip

Hovering the mouse pointer over the command offers an option to copy the command to the clipboard.

Code#

File contents (mostly Fandango .fan files) are shown like this:

<start> ::= <fandango>

We often only show excerpts; the complete examples can be downloaded, as in digits.fan.

Executable code examples (mostly in Python) are shown like this:

from fandango import Fandango

Enter these at a Python prompt, or include them in your Python programs.

Tip

Hovering the mouse pointer over the code offers an option to copy the code to the clipboard.

Callouts#

This documentation uses the following conventions for callouts:

Tip

Show helpful information or another way to do something.

Note

Bring additional information to the readers’ attention.

Important

Bring important information to the readers’ attention.

Under Construction

Indicate that some parts of the documentation or the implementation are under construction.

Caution

Tell the reader to proceed carefully.

Warning

Warn about possible irreversible damage, such as permanent data loss.

Danger

Warn about hazards that may lead to death or serious injury.

Quizzes#

This documentation also uses quizzes – that is, questions for the reader. The solutions are initially hidden, but can be unhidden by clicking on them.

For instance, what does a Warning callout indicate?

Changes#

These hints highlight changes across versions:

Added in version 1.0: Explanation of the new feature.

Changed in version 1.0: Explanation of the change.

Deprecated since version 1.0: Explanation of the deprecation.