2024-01-24 07:26:30 +00:00
|
|
|
## this file is to test the reader/feeder against weirdly formatted input text.
|
2024-01-22 16:11:13 +00:00
|
|
|
|
|
|
|
{ ## START
|
|
|
|
|
|
|
|
| J |
|
|
|
|
|
|
|
|
defun xxx (x y z
|
2024-02-03 16:57:53 +00:00
|
|
|
:: r ) {
|
2024-01-22 16:11:13 +00:00
|
|
|
|
2024-01-24 07:26:30 +00:00
|
|
|
| k
|
2024-01-22 16:11:13 +00:00
|
|
|
b
|
|
|
|
s |
|
|
|
|
|
|
|
|
k := (+ x y z)
|
|
|
|
b := (* k k)
|
|
|
|
s := (* b b)
|
|
|
|
|
|
|
|
printf "%d %d %d\n" k b s
|
|
|
|
|
|
|
|
r := s
|
|
|
|
J := r
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
j
|
|
|
|
] \
|
2024-01-24 07:26:30 +00:00
|
|
|
:= (xxx
|
|
|
|
10
|
|
|
|
20
|
2024-01-22 16:11:13 +00:00
|
|
|
30)
|
|
|
|
|
|
|
|
if (eqv? j 12960000) \
|
|
|
|
{
|
|
|
|
printf "OK: j is 12960000\n"
|
|
|
|
} else {
|
|
|
|
printf "BAD: j is not 12960000\n"
|
|
|
|
}
|
|
|
|
|
|
|
|
xxx \
|
|
|
|
1 \
|
|
|
|
2 \
|
|
|
|
3
|
|
|
|
|
|
|
|
if (eqv? J 1296) {
|
|
|
|
printf "OK: J is 1296\n"
|
|
|
|
} else {
|
|
|
|
printf "BAD: J is not 1296\n"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-03-09 13:48:04 +00:00
|
|
|
k := 5
|
|
|
|
if { q := 10; k < q } { ## a block expression is a normal expression. so t can be used as a conditional expression for if
|
|
|
|
printf "OK: k is less than q\n"
|
|
|
|
} else (printf "BAD: k is not less than q\n")
|
2024-01-22 16:11:13 +00:00
|
|
|
|
|
|
|
} ## END
|