Getting Started
This page gives you a quick, progressive tour of plat-lang. Each step adds one
idea, so you can start with a tiny script and gradually build up to the core
features used by real programs. If you have not built the interpreter yet, start
with Installation. Once build/platlang exists, you can run
any script like this:
Diacritics and ASCII spellings
Canonical Limburgish uses many diacritics, which are rare in programming
languages and can be tedious to type on some keyboards. For that reason,
every keyword or built-in name that carries a diacritic also has a
non-diacritic spelling in plat-lang. For example, both trök and trok
are accepted for returning from a function.
1. Say hello
A plat-lang program can be as small as a call to the built-in print function:
aafdrokke(value) prints a value followed by a newline. The dialect spelling
aafdrökke(value) works too.
2. Store values with loat
Use loat to declare variables. Strings are teks, numbers are nómmer, and
+ can concatenate text.
loat naam = "Jan"
loat taal = "plat-lang"
loat versie = 1
aafdrokke("Hallo, " + naam)
aafdrokke("Welkom bie " + taal + " " + versie)
A declaration without a value starts as niks, the language's absence value.
3. Make choices with es
Conditionals use es, optional angesj:, and end with enj.
Truthiness keeps early programs compact: niks, kwatsj, 0, empty text,
and empty tables are falsy; other values are truthy.
4. Repeat work with loops
Use zolang when you want to loop while a condition stays truthy:
Use veur for a half-open numeric range. This prints 0, 1, and 2:
Inside loops, euversjlaon continues to the next iteration and aafbraeke
exits the loop.
5. Name reusable work with functions
Functions are declared with funksie and return with trok.
Top-level functions are registered before execution starts, so a function can call another function declared later in the same file. Recursion works too:
6. Group data with tabel tables
tabel tables are mutable containers. You can use them like records:
You can also use them like arrays. Numeric keys start at 0.
Computed keys let a program choose what to read or write:
7. Read input
The minimal standard library also includes inveure(), which reads one line of
input as teks.
Run that kind of script with piped input:
Where to go next
Continue with the Language Tour for the full current language boundary, including supported operators, protected names, diagnostics, and the features that are intentionally not part of the language yet.