🐐 Reviving this old project. Mainly adding tests and fixing bugs.

This commit is contained in:
2026-03-31 18:25:20 +02:00
parent 88d7f0ed69
commit e845cb62c1
20 changed files with 1502 additions and 1090 deletions

View File

@@ -7,7 +7,7 @@
### Hello World
```
DESIGNA x VT "Hello World!"
DICE x
DICE(x)
```
### Recursive Fibonacci number function
@@ -99,7 +99,7 @@ Booleans are denoted with the keywords `VERITAS` for true and `FALSITAS` for fal
Arrays are defined using square brackets (`[]`) and commas (`,`). An array of integers can also be initialized with the `VSQVE` keyword:
```
DESIGNA x VT [1 VSQVE 10]
DESIGNA x VT [I VSQVE X]
```
## Conditionals
@@ -110,10 +110,10 @@ If-then statements are denoted with the keywords `SI` (if) and `TVNC` (then). Th
DESIGNA x VT VERITAS
SI x TVNC {
DICE(I)
REDI(NVLLLVS)
REDI(NVLLVS)
}
DICE NVLLVS
DICE(NVLLVS)
> I
```
@@ -209,12 +209,12 @@ PER y IN x FACE {
```
## Functions
Functions are defined with the `DEFINI` and `VT` keywords. The `REDI` keyword is used to return. `REDI` must have exactly one parameter. `REDI` can also be used to end the program, if used outside of a function.
Functions are defined with the `DEFINI` and `VT` keywords. The `REDI` keyword is used to return. `REDI` can also be used to end the program, if used outside of a function.
Calling a function is done with the `INVOCA` keyword.
```
DEFINI square x VT {
DEFINI square(x) VT {
REDI(x*x)
}