▶ NUMBERS

Number is a positive or negative whole number, as in { ..., -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, ... }.

Consider this program:

```
main »
```

age 22

print age

22

First we assign the numeric value: 22, to the

`age`

variable. The
`print`

function is a system function that handles printing of variables.
Numbers can be added by the '+' operator:

```
main »
```

one_plus_two 1 + 2

print one_plus_two

3

Assigning sum of variables to a new variable:

```
main »
```

num1 1

num2 2

sum num1 + num2

In the line: '

Other options of adding numeric variables and numbers:

`sum num1 + num2`

', the sum of `num1`

and
`num2`

variables iscalculated, and then is assigned to `sum`

variable.Other options of adding numeric variables and numbers:

```
main »
```

num1 1

num2 2

sum1 num1 + 2

sum2 num1 + num2

print sum1

print sum2

print 1 + 2

print num1 + num2

3

3

3

3

3

3

3

Consider this shopping list program:

```
main »
```

t_shirts_num 2

t_shirt_price 32

t_shirts_price t_shirts_num * t_shirt_price

print 'The price of ' + t_shirts_num + ' T-shirts is: ' + t_shirts_price

blue_jeans_num 2

black_jeans_num 1

total_jeans_num blue_jeans_num + black_jeans_num

jeans_price 42

total_jeans_price total_jeans_num * jeans_price

print 'The price of ' + total_jeans_num + ' jeans is: ' + total_jeans_price

sum_total t_shirts_price + total_jeans_price

print '-----------------------------------'

print 'SUM TOTAL: ' + sum_total

The price of 2 T-shirts is: 64

The price of 3 jeans is: 126

-----------------------------------

SUM TOTAL: 190

The price of 3 jeans is: 126

-----------------------------------

SUM TOTAL: 190

**Attention: Tyl is not a mathematical calculator!**

In this code:

```
print 1 + 2 * 3
```

print 1 * 2 + 3

print 3 * 2 + 1

7

5

9

5

9

All of the lines are calculated in

So, first line went fine:

**:***Tyl Statement Order*Aregardless of mathematical operations order!OP1( BOP2C )

So, first line went fine:

`1 + 2 * 3 = 7`

. Second line escaped error, because:
`1 * (2 + 3) = 1 * 2 + 3`

(could be nice to write a program that will find more
of these numbers). The third line is not following mathematical order! Instead it is calculated
according to Tyl Statement Order: `3 * (2 + 1) = 9`