Start the standard library
[kaleidoscope-hs.git] / stdlib.c
diff --git a/stdlib.c b/stdlib.c
new file mode 100644 (file)
index 0000000..9749ee3
--- /dev/null
+++ b/stdlib.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+// Takes a double and writes it to stdout
+double putchard(double x) {
+       int res = putchar((int)x);
+       fflush(stdout);
+       return (double)res;
+}