blob: dc805fc70304509a97ac8ebfd506041c3e19a784 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# Test the register usage of the virtual machine and
# the blocks in var statements
proc main(a, b: int) =
var x = 0
write(stdout, x)
if x == 0:
var y = 55
write(stdout, y)
write(stdout, "this should be the case")
var input = "<no input>"
if input == "Andreas":
write(stdout, "wow")
else:
write(stdout, "hugh")
else:
var z = 66
write(stdout, z) # "bug!")
main(45, 1000)
#OUT 055this should be the casehugh
|