Baltie
Implementation of programming language BaltieBaltie is native and the only implementation available for Baltie programming language. It is developed by SGP Systems, and it is proprietary.
Links:
Examples:
Hello, World!:
Example for versions Baltie 3This 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
Fibonacci numbers:
Example for versions Baltie 3The 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 (result)
Factorial:
Example for versions Baltie 3This 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 (result)
CamelCase:
Example for versions Baltie 3This 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
Quadratic equation:
Example for versions Baltie 3
Quadratic equation in Baltie 3
Factorial:
Example for versions Baltie 3A 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)
Comments
]]>blog comments powered by Disqus
]]>