diff options
| author | nic-gaffney <gaffney_nic@protonmail.com> | 2023-06-25 18:55:58 -0500 |
|---|---|---|
| committer | nic-gaffney <gaffney_nic@protonmail.com> | 2023-06-25 18:55:58 -0500 |
| commit | bf647e430e3a3642c8199dc81a411d5e1586cabb (patch) | |
| tree | c95a82bcaa233e1653b702d9fa7ce54ca7dd95e6 /std/stdlib.sloth | |
| parent | 6a59bf6d5345fbe2487e1cc36c36aa6884fcc39d (diff) | |
| download | sloth-bf647e430e3a3642c8199dc81a411d5e1586cabb.tar.gz | |
Standard library beginnings
Diffstat (limited to 'std/stdlib.sloth')
| -rw-r--r-- | std/stdlib.sloth | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/std/stdlib.sloth b/std/stdlib.sloth new file mode 100644 index 0000000..7b6e2f9 --- /dev/null +++ b/std/stdlib.sloth @@ -0,0 +1,14 @@ +foreign fn wait(x: Int) Void; +foreign fn print(str: String) Void; + +fn termpos(x: int, y: int) Void { + print("\x1b["); + print(x); + print(";"); + print(y); + print("H"); +} + +fn termclear() Void { + print("\x1b[2J\x1b[H"); +} |
