#1
in:
var x = 10;
output(string(x));
var x = 5;
free(x);
out:
10
error:
line 3: x has already been declared
#2
in:
var x = 10;
output(string(x));
out:
10
error:
line 1: x is not free
#3
in:
var x = 10;
output(string(x + 2));
x + 3;
sqrt(3 + 4);
string(x);
output(string(x));
out:
12
error:
line 3: invalid expression
#4
in:
var x = 10;
var y;
output(string(x + 2));
output(string(y));
out:
12
error:
line 4: y is used before its value is set
With line numbers. thanks, john_e_lille,Minh-Nhut Hong.



