2023-11-12 14:03:39 +00:00
|
|
|
defun aaa(a b) {
|
|
|
|
| c |
|
|
|
|
set c (+ a b);
|
|
|
|
return c;
|
|
|
|
};
|
|
|
|
|
|
|
|
set k (aaa 10 20);
|
|
|
|
|
2023-11-14 03:20:47 +00:00
|
|
|
if (= k 30) { printf "OK\n"; }
|
|
|
|
else { printf "ERROR\n"; };
|
2023-11-12 14:03:39 +00:00
|
|
|
|
2023-11-14 03:20:47 +00:00
|
|
|
## --------------------------------------
|
2023-11-12 14:03:39 +00:00
|
|
|
|
2023-11-14 03:20:47 +00:00
|
|
|
defun mkfun(t) {
|
|
|
|
return (fun(c) {
|
|
|
|
return (+ t c);
|
|
|
|
});
|
|
|
|
};
|
2023-11-12 14:03:39 +00:00
|
|
|
|
2023-11-14 03:20:47 +00:00
|
|
|
set f (mkfun 20);
|
|
|
|
set k (f 50);
|
|
|
|
if (= k 50) { printf "OK\n"; }
|
|
|
|
else { printf "ERROR\n"; };
|