summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
705b0b8)
Our standard library so far is just going to contain a single function
that acts as a version of putchar(3), except it operates on doubles.
We'll also flush stdout so that we can immediately see what we've
printed when we're inside the repl.
--- /dev/null
+#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;
+}