Skip to content

Specification0 · How to read this specification

0.1

What you will find

This specification describes the whole PseudoLearn language and its engine, with examples that really run every time it is built.

Markdown version

0.1.1 How it works

The specification is divided into thirteen parts and six appendices. Each part covers a topic and each section explains a single idea. You can read it from start to finish or jump straight to what you need.

The parts follow the order in which people usually learn to program. First the loose pieces of the text, then data, then instructions, and finally how the engine works inside.

Figure 0.1-1.The route through the specification. The parts at the top support the ones below; the appendices are for looking things up.

A diagram of stacked boxes. At the top Part 0 on how to read and Part I with the overview. Below, in two columns, lexical structure and types; then expressions and declarations; then control flow; then subroutines and objects. At the bottom a band with programs, errors, concurrency, library and engine, and another with the appendices.

Every program in this specification was run with the real PseudoLearn engine. Below each one you see what it wrote and how it ended. If the engine ever changed its behaviour, the specification would stop building until the text was corrected.

ProgramThe first program

Algorithm Hola
  Write "Hola, mundo";
EndAlgorithm

Output

Hola, mundo

The program finishes normally.

0.1.2 Reading layers

Every section has a body that makes sense without prior knowledge. Around the body there are boxes you can read or skip:

BoxWhat it is for
In one sentenceThe idea of the section summed up in one sentence
Exact limitThe precise number when it matters: ranges, sizes, depths
Common errorsThe real engine messages and how to fix them
InsideWhat the engine does: intermediate representation and trace
NoteTypical confusions and something to try on your own

The body never depends on the collapsible boxes. You can skip every "Inside" without losing the thread.

In short

  • Thirteen parts ordered from small to large and six reference appendices.
  • One idea per section, with a figure, run examples and a summary.
  • The collapsible boxes are optional.
  • Every example was run with the engine when the specification was built.