This repository has been archived on 2024-01-18. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
compilation/flap/tests/02-Interpreter/61-while-04.eval.hopix.human-readable
2023-10-25 15:16:53 +02:00

9 lines
No EOL
219 B
Text

let test =
let r = ref 1;
let n = ref 5;
while (!n >? 0) {
r := !r * !n;
n := !n - 1
};
print_string ("This test is ");
print_string (if (!r =? 120) then { "OK!\n" } else { "KO!\n" })