Back

ZIRK programming language official documentation // Data operations

1. + (Plus(addition(sum)))


+ sign is usually used to summarise something i think. At the moment there are 4 combinations of adition:

_yan_ + _yan_ is just addition of numbers:

Program exemple:

_yan_ a = 2

_yan_ b = 46

a + b

owo a

Program output:

48


_shyan_ + _shyan_ is merging strings togather:

Program exemple:

_shyan_ a = Hello_

_shyan_ b = world!

a + b

owo a

Program output:

Hello_world!


_shyan_ + _yan_ is adding given number spaces to string. I'll add another string to a summary to show how it works:

Program exemple:

_shyan_ a = Hello

_yan_ b = 5

_shyan_ c = world!

a + b

a + c

owo a

Program output:

Hello world!


_yan_ + _shyan_ is adding a string length to a given number:

Program exemple:

_yan_ a = 1

_shyan_ b = 123456

a + b

owo a

Program output:

7

2. - (Minus(substraction(difference)))


- is used to sudtract second value from first. There are 3 types of substraction:

_yan_ - _yan_ is difference of numbers:

Program exemple:

_yan_ a = 2

_yan_ b = 46

a - b

owo a

Program output:

-44

_shyan_ - _yan_ shortens the string by the given number of characters:

Program exemple:

_shyan_ a = 123456789

_yan_ b = 4

a - b

owo a

Program output:

12345

_yan_ - _shyan_ substract the length of string fro the number:

Program exemple:

_yan_ a = 10

_shyan_ b = 12345

a - b

owo a

Program output:

5

3. * (Multiply(multiplication(product)))


* works simple: you assign the product of multiplication of two variables to the first variable. In the current version (0.0.19) there are 4 ways of multiplication:

_yan_ * _yan_ is algebraic multiplication:

Program exemple:

_yan_ a = 37

_yan_ b = 15

a * b

owo a

Program output:

555

_shyan_ * _shyan_ multiplies the first string by the length of the second:

Program exemple:

_shyan_ a = AsdfdsA

_shyan_ b = 123

a * b

owo a

Program output:

AsdfdsAAsdfdsAAsdfdsA

_shyan_ * _yan_ multiplies the strint _yan_ times:

Program exemple:

_shyan_ a = aBc

_yan_ b = 4

a * b

owo a

Program output:

aBcaBcaBcaBc

_yan_ * _shyan_ is multiplication of the number by length of string:

Program exemple:

_yan_ a = 3

_shyan_ b = qwert

a * b

owo a

Program output:

15

3. / (Devide(devision(fraction)))


/ is used to devide the first variable by the second. As you know, there are 3 types of deviion:

_yan_ / _yan_ returns the fraction of the virst value over the second:

Program exemple:

_yan_ a = 22

_yan_ b = 7

a / b

owo a

Program output:

3.142857142857143

_yan_ / _yan_ returns the fraction of the virst value over the second:

Program exemple:

_yan_ a = 22

_yan_ b = 7

a / b

owo a

Program output:

3.142857142857143

_shyan_ / _yan_ deletes given number of character at the beginning of the string:

Program exemple:

_shyan_ a = abcdefgh

_yan_ b = 3

a / b

owo a

Program output:

defgh

_yan_ / _shyan_ devides number by the length of string:

Program exemple:

_yan_ a = 19

_shyan_ b = qwertyu

a / b

owo a

Program output:

2.7142857142857144