9 lines
219 B
Text
9 lines
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" })
|