2024-02-03 16:57:53 +00:00
|
|
|
defun x (a :: x y z) {
|
2024-01-14 00:48:57 +00:00
|
|
|
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);
|
|
|
|
};
|
|
|
|
|
2024-01-22 16:11:13 +00:00
|
|
|
if (/= a 900) { print "ERROR: a is not 900\n" } \
|
2024-01-14 00:48:57 +00:00
|
|
|
else { printf "OK: %d\n" a };
|
|
|
|
|
2024-01-22 16:11:13 +00:00
|
|
|
if (/= b 60) { print "ERROR: b is not 60\n" } \
|
2024-01-14 00:48:57 +00:00
|
|
|
else { printf "OK: %d\n" b };
|
|
|
|
|
2024-01-22 16:11:13 +00:00
|
|
|
if (/= c 840) { print "ERROR: c is not 840\n" } \
|
2024-01-14 00:48:57 +00:00
|
|
|
else { printf "OK: %d\n" c };
|