Skip to content

SpecificationII · Lexical structure

2.5

Reserved words

Reserved words belong to the language itself, such as If or While; you cannot use them as the name of a variable.

Markdown version

2.5.1 How it works

Each profile has its list of reserved words: those that form the instructions (If, While, Write), the types (Integer, String), the values (True, False) and some operators written with letters (And, Or, Not, Div, Mod). Some are made of several words, such as Step or By Reference.

Figure 2.5-1.Reserved words are grouped by family. Each family's colour is the same one the editor uses.

Six coloured bands: program structure, subroutines, objects, types, boolean values and operators written with letters, each with examples.

Several words have aliases: other spellings the engine recognises and treats the same. In the Spanish profile, Proceso is an alias of Algoritmo and Mostrar of Escribir. The engine accepts aliases, but when formatting or translating it converts them to the main form.

ProgramAccepted aliases

Algorithm Alias
  Define hecho As Boolean <- True;
  Write "El alias funciona";
  If Not hecho Or hecho Then
    Write 7 Mod 3;
  EndIf
EndAlgorithm

Output

El alias funciona
1

The program finishes normally.

2.5.2 Contextual words

Some words are only special in one particular place. For example, each only means something inside a for-each loop, and append only as a method of a vector. Outside that position they are ordinary names. They are called contextual words and do not reserve the name.

In short

  • Reserved words make up the language and cannot be used as names.
  • They ignore case.
  • Aliases are accepted and normalised to the main form.
  • Contextual words are only special in their position.