Tyl Programming Language
▶ VARIABLE ASSIGNMENT - PART 2
Variables assignments can be cascaded:
num_b num_a 21
The code can be denoted:
21 → num_a → num_b

This one line does:
  1. Declare num_b
  2. Declare num_a
  3. 21 → num_a
  4. 21 → num_b
What happened to the num_a → num_b section?

To understand this, let's use print function with the parameter: 21
print 21
This line of code yields the value: 21. Then this value can be assigned to a variable:
num print 21
num gets the value of the statement: 'print 21', which is 21.

What will be the value of this assignment statement?
num 21
Thats right! 21.

So we can write also:
print num 21
The system will print: 21, which is the result of the statement: 'num 21'.

So in the statement:
num_b num_a 21
The system first declares num_b. Then the statement: 'num_a 21', declares num_a, assignes it the value: 21, and yields the result: 21. The result: 21 is assigned to num_b.


PART 1
PART 3