12 lines
1.1 KiB
Plaintext
12 lines
1.1 KiB
Plaintext
set a 0 > Useless intialization - All lowercase variables have an initial value of 0
|
|
set b 66 > Simple variable assignment - ''b'' is now the ASCII value of 66, or the character 'B'
|
|
[c=0] set c 5 > Conditional variable assignment - If ''c'' is 0, then set ''c'' to 5
|
|
set ? 6 > A "goto" command; Setting the ''?'' variable defines the line of code to be executed next
|
|
set z 1 > This line of code will never be executed, because the previous skipped it
|
|
set c 10 > Line #5 skipped to here
|
|
set d A > Assigning a variable to another variable - ''d'' is now ASCII 65, or the character 'A'
|
|
set b ! > The ''!'' deals with I/O. Setting a variable to it receives an input character and assigns it to the variable
|
|
set ! a > Setting the exclamation point to a variable outputs that variable
|
|
set e (d+1) > Combiners are defined inside round brackets - () - and have an addition and a subtraction function
|
|
set f (e-1) > Variable ''e'' was assigned to ''d'' + 1 (65 + 1 = 66, character B), and ''f'' was assigned to ''e'' - 1 (66 - 1 = 65, character A)
|