blob: ec5fe91b5c33b4afc758b69cfc849aa86ab8aede (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include "std/io.toc", io;
#include "std/base.toc", base;
sleep ::= #foreign("sleep", base.libc) fn(#C unsigned) #C unsigned;
main ::= fn() {
io.io_init();
io.file_writes(&io.std_out, "hello!\n");
io.file_writes(&io.std_out, "goodbye!\n");
io.file_writes(&io.std_err, "ERROR: ");
sleep(1);
io.file_writes(&io.std_err, "something went wrong!\n");
}
main();
|