diff options
| author | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
|---|---|---|
| committer | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
| commit | 967be9e750221ab2ab783f95df79bb26d290a45e (patch) | |
| tree | 6802900a5e975f9f68b169f0f503f040056d6952 /tiger-compiler/tests/good/escapes_series.tig | |
Diffstat (limited to 'tiger-compiler/tests/good/escapes_series.tig')
| -rw-r--r-- | tiger-compiler/tests/good/escapes_series.tig | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tiger-compiler/tests/good/escapes_series.tig b/tiger-compiler/tests/good/escapes_series.tig new file mode 100644 index 0000000..d71a013 --- /dev/null +++ b/tiger-compiler/tests/good/escapes_series.tig @@ -0,0 +1,19 @@ +let + var i := 69 + function print_a_number(k: int) = print_int(k) + function serial_print(value: int) = (print_a_number(value); print_a_number(i)) + function conditional_print(value: int) = if (value <> 0) then print_a_number(value) else print_a_number(i) +in + print_a_number(i); + print("\n"); + serial_print(10); + print("\n"); + serial_print(i); + print("\n"); + conditional_print(0); + print("\n"); + conditional_print(i); + print("\n"); + conditional_print(68); + print("\n") +end |
