Baltie

Implementation of programming language Baltie

Baltie is native and the only implementation available for Baltie programming language. It is developed by SGP Systems, and it is proprietary.

Examples:

Hello, World!:

Example for versions Baltie 3

This example consists of two icons: first one is literal and contains the message to be printed, while the second one is read key or mouse button (wait for pressing) and basically just pauses the execution until any key is pressed.

"Hello, World!" in Baltie 3
"Hello, World!" in Baltie 3

Fibonacci numbers:

Example for versions Baltie 3

The example is rather self-explanatory: boxes A..D are global variables (blue for integer, yellow for string). Arrow facing left is assignment. For loop takes variable, range start and range end as parameters in round brackets, loop body is enclosed in {} brackets.

Fibonacci numbers in Baltie 3
Fibonacci numbers in Baltie 3

Fibonacci numbers in Baltie 3 (result)
Fibonacci numbers in Baltie 3 (result)

Factorial:

Example for versions Baltie 3

This example uses iterative factorial definition. While loop takes a condition as parameter in round brackets. Variable out contains the output of the example. The only tricky thing is outputting multi-line variable: to do this, one had to move the sprite to the top of the screen, so that the output isn’t truncated by the lower side of the screen. 13! overflows.

Factorial in Baltie 3
Factorial in Baltie 3

Factorial in Baltie 3 (result)
Factorial in Baltie 3 (result)

CamelCase:

Example for versions Baltie 3

This example features a standard character-wise string processing. Note that the language doesn’t support boolean variables, so “previous character was a separator” is stored as an integer. Baltie 3 is a strongly typed language, so cast from character to its ASCII-code has to be done explicitly using a corresponding function.

CamelCase in Baltie 3
CamelCase in Baltie 3

Quadratic equation:

Example for versions Baltie 3

Quadratic equation in Baltie 3
Quadratic equation in Baltie 3

Factorial:

Example for versions Baltie 3

A shorter program to calculate factorials, provided by Bohumír Soukup of SGP systems. It prints the factorials directly to output stream without storing them in temporary variable.

Factorial in Baltie 3 (shorter version)
Factorial in Baltie 3 (shorter version)