47 lines
465 B
Plaintext
47 lines
465 B
Plaintext
# VARIABLE DECLARATIONS
|
|
# =====================
|
|
# simple
|
|
let a = 35
|
|
assert a == 35
|
|
|
|
let b = a + 2
|
|
assert b == 37
|
|
|
|
# assignment
|
|
let c = 3
|
|
assert c == 3
|
|
|
|
c = 5
|
|
assert c == 5
|
|
|
|
c = "boom"
|
|
assert c == "boom"
|
|
|
|
# blocks
|
|
let d = 1
|
|
|
|
begin
|
|
assert d == 1
|
|
|
|
let d = 2
|
|
assert d == 2
|
|
|
|
begin
|
|
assert d == 2
|
|
|
|
let d = 3
|
|
assert d == 3
|
|
|
|
d = -1
|
|
assert d == -1
|
|
end
|
|
|
|
assert d == 2
|
|
end
|
|
|
|
assert d == 1
|
|
|
|
# multiple declaration
|
|
let e = 3
|
|
let e = 7
|
|
assert e == 7 |