Types

The identifier can be string, integer, float, complex or vector.
Note, all types are stored internally as a string and each identifier has an own scope. The scope means that the variable is only visible from the first block used and recursively. When the block is finished, it is discarded. If this should not happen, it should be initialized in the main block or via global.

var variable // similar to variable := ”
local variable // similar to variable := ” (same as var)
global variable // similar to variable := ” but with global scope

variable := #123 // char
variable := ‘Hello world!’ // string
variable := “Hello world!” // string
variable := Hello! // string
variable := (1<2) // boolean
variable := %1111:0000 %0101.0101 // binary
variable := $FF:FF $A:FFFF // hexadecimal
variable := 123 // integer
variable := 123.456 // float
variable := (123+123.456) // integer and float calculation
variable := <10,10> // complex
variable := <0,0,0> // vector
variable := 10 #9 11 #9 12 #9 13 // tab separated array

Replacements

a := ‘Test’
print ‘My’ a ‘!’
MyTest!
print ‘My@a!’ // pattern matching
MyTest!

b := 10 #9 11 #9 12 #9 13
print b[2] // array access
11
b[2] := 0
print b[2] // array access
0

Assignments

variable := string1 string2
{variable = string1string2}

variable |= string1 string2
{variable = string1 string2}

variable ~= string1 string2
{variable = string2string1}

variable $= 5 “Hello world” “local hub”
{variable = “Hello local”}
variable $= -5 “Hello world”
{variable = “world”}

variable != “<” “>” // not
{variable = “<1,2,3>”} -> {variable = “1,2,3”}

variable #= 2 123.456789 23.4567
{variable = 123.45 23.45}
variable #= -5 11
{variable = 00011}

variable += 12 6
{variable = 18}
{Note: 2 <1,2,3> -> <3,2,3>; <2,2> <1,2,3> -> <3,4,3> }

variable -= 12 6
{variable = 6}

variable *= 12 6
{variable = 72}
{Note: 2 <1,2,3> -> 2; <2,2> <1,2,3> -> <2,4> }

variable /= 12 6
{variable = 2}

variable o= <1,2> <3,4>
{variable = 11}

variable x= <1,2,3> <4,5,6>
{variable = < -3, 6,-3>}

variable %= <1,2,3> // maxnorm
{variable = < 0.3333, 0.6666, 1>}

Functions

variable := min 1 2 3 4 5
{variable = 1}

variable := max 1 2 3 4 5
{variable = 5}

variable := minmax <1 2> 1.5 <4 5>
{variable = 4.5}