work in progress dropping the brand bits
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2024-09-12 18:06:12 +09:00
parent 6e9e1d35f4
commit f6f475df4a
8 changed files with 136 additions and 132 deletions

View File

@ -47,4 +47,3 @@ if (== z1 101) { printf "OK: z1 is %d\n" z1 } \
else { printf "ERROR: z1 is not 101 - %d\n" z1 }
if (== z2 100) { printf "OK: z2 is %d\n" z2 } \
else { printf "ERROR: z1 is not 100 - %d\n" z2 }

View File

@ -1,11 +1,11 @@
defun repeat(n f) {
fun repeat(n f) {
while (> n 0) {
f;
set n (- n 1);
};
};
defun test-non-local-ret-1(k) {
fun test-non-local-ret-1(k) {
repeat 10 (fun() {
set k (+ k 2);
if (= k 28) { revert k };
@ -22,8 +22,21 @@ set a (test-non-local-ret-1 21);
if (~= a 41) { printf "ERROR: a must be 41\n" } \
else { printf "OK %d\n" a };
fun dd() { return (- 99999999999999991111111111111111111111111111111111111111.111111111 999999999999999999999999999999.999999999999) }
defun ff() { return 999 };
fun ee() { return (+ 1111111111111111111111111111111111111111111111111 999999999999999999999999999999999999999999) }
fun ff() { return 999 };
## test a normal block return with a fixed point decimal
set a (dd);
if (~= a 99999999999999991111111110111111111111111111111111111111.111111111001) { printf "ERROR: a must be 99999999999999991111111110111111111111111111111111111111.111111111001\n" } \
else { printf "OK %f\n" a };
## test a normal block return with a large integer
set a (ee);
if (~= a 1111112111111111111111111111111111111111111111110) { printf "ERROR: a must be 1111112111111111111111111111111111111111111111110\n" } \
else { printf "OK %d\n" a };
## test a normal block return
set a (ff);