Skip to content

Specification0 · How to read this specification

0.4

How to read the figures

Figures show what the program text does not: memory, the order in which each part runs and what the engine records.

Markdown version

0.4.1 How it works

There are two kinds of figures. Static ones explain an idea with a single drawing. Stepped figures tell a run: below them are "Previous" and "Next" buttons and a text explaining each step.

Stepped figures come with zones. Each zone is a panel that grows as you move forward:

  • Memory: the variables and their value at that moment.
  • Output: what the program has already written.
  • Trace: the events the engine recorded, such as "enters statement" or "decision".
  1. 1The engine creates the variable total with the value 0.

    Memory

    total = 0

    Trace

    enters statement · line 2

  2. 2It adds 5 and the total becomes 5.

    Memory

    total = 0

    total = 5

    Trace

    enters statement · line 2

    enters statement · line 3

  3. 3It writes the total. The output receives the line "5".

    Memory

    total = 0

    total = 5

    Output

    5

    Trace

    enters statement · line 2

    enters statement · line 3

    writes · 5

Figure 0.4-1.A stepped figure. The drawing highlights the part being run; the zones below collect memory, output and trace.

Three stacked instructions joined by arrows: total gets 0, total gets total plus 5, and Write total. Below, a box with the name total and its value. Each step highlights the instruction being run and the value changes from 0 to 5.

This is the program the figure tells:

ProgramAdd and write

Algorithm Suma
  Define total As Integer <- 0;
  total <- total + 5;
  Write total;
EndAlgorithm

Output

5

The program finishes normally.

0.4.2 Figure colours

Figures use the same colours as the editor and switch by themselves with the light or dark theme. Solid boxes are values or instructions; dashed boxes are slots or things that do not exist yet. Red marks what fails or does not run; green, what ends well.

In short

  • Static figures explain an idea; stepped figures tell a run.
  • The Memory, Output and Trace zones grow with each step.
  • Colours follow the editor and the system theme.