# 0.3 How to read a written form

> A written form is the mould of a construct: it says which words are fixed, which slots you fill in and which parts you may leave out.

Web page: https://pseudolearn.app/en/spec/lectura/formas

> **In one sentence**
>
> A written form is the mould of a construct: it says which words are fixed, which slots you fill in and which parts you may leave out.

## 0.3.1 How it works

Every language construct is first shown with its form. Coloured words are written exactly as shown. Slots «like this» are replaced by code. Whatever goes between ⟦ and ⟧ is optional: you may write it or not.

```pseudolearn
While «condition» Do
  «statements»
EndWhile
```

**Figure 0.3-1: How to read a form**

At the top, the If form: the word If and the word Then are fixed, and between them there is a dashed slot called condition. An arrow goes down from the slot to the filled line If n > 0 Then. At the bottom, Else appears between double brackets: it is an optional part that can be left out.

A form has fixed words and slots. Filling the slots gives a line of code; whatever goes between ⟦ and ⟧ you may leave out.

When a form has parts that repeat or are optional, it comes with an **anatomy**: a real line of code split into pieces, with the name of each one underneath.

```pseudolearn
While n <= 3 Do
```
- `While`: word that opens the loop
- `n <= 3`: condition: checked before every round
- `Do`: word that ends the line

This program fills the `While` form with a condition and a statement:

### Program: Filling in the form

```pseudolearn
Algorithm Cuenta
  Define n As Integer <- 1;
  While n <= 3 Do
    Write n;
    n <- n + 1;
  EndWhile
EndAlgorithm
```

**Output**

```text
1
2
3
```

*The program finishes normally.*

> **Note**
>
> The form shows the usual way to write a construct, with the names the text uses, such as «condition». The complete grammar, with all its variants, is in the appendix.

**In short**
- Coloured words: written as they are.
- Slots «like this»: you fill them in.
- ⟦…⟧: optional part.
- An anatomy splits a real example and names each piece.

**See also**
- [0.2 Typographic conventions](https://pseudolearn.app/en/spec/lectura/convenciones.md)
- [A.1 Grammar](https://pseudolearn.app/en/spec/apendice/gramatica.md)
