12.1.1 How it works
There are two kinds of symbols:
- built-in functions, called by name:
length(t),sqrt(x),parseJson(text); - operations, called on a receiver with a dot:
console.writeError(text),date.isoFormat().
Every symbol belongs to a family: text, bytes, numbers, collections, input and output, time, JSON, network or tasks. Appendix D lists them all.
Two columns. On the left, the families that only compute: text, numbers, collections, JSON and bytes. On the right, those that need a capability: input and output, time, network and tasks.
A symbol has a single identity: its Spanish name, its English name and its aliases name the same thing with the same signature. ConvertirANumero is an alias of AReal:
ProgramTwo names, one function
Algorithm Alias
Write toReal("2.5"), " ", toReal("2.5");
EndAlgorithmOutput
2.5 2.5
The program finishes normally.
No library name matches a reserved word, and library names are not reserved: a subprogram of your own with the same name hides the built-in one throughout the text.
Since every symbol has its own identity, a project can mix modules written in different profiles: an English module calling length and a Spanish one calling Longitud use the same function.
In short
- Built-in functions by name; operations on a receiver.
- Every symbol has an identity, names in both profiles and aliases.
- The input, output, time and network families need capabilities.