hcl/t/var-02.hcl
hyung-hwan bc7cbd9ed2
All checks were successful
continuous-integration/drone/push Build is passing
renumbers error testers basing on 5000.
fixed a compiler bug not checking the lower bound of block depth in find_variable_backward_with_word()
2024-01-23 01:11:13 +09:00

25 lines
421 B
HCL

defun x (a ::: x y z) {
x := (* a a);
y := (+ a a);
z := (- x y);
};
j := 21;
if (eqv? j 20) {
[a,b,c] := (x 20);
q := (x 20);
} else {
[a,b,c] := (x 30);
q := (x 30);
};
if (/= a 900) { print "ERROR: a is not 900\n" } \
else { printf "OK: %d\n" a };
if (/= b 60) { print "ERROR: b is not 60\n" } \
else { printf "OK: %d\n" b };
if (/= c 840) { print "ERROR: c is not 840\n" } \
else { printf "OK: %d\n" c };