aboutsummaryrefslogtreecommitdiff
path: root/examples/learn
diff options
context:
space:
mode:
Diffstat (limited to 'examples/learn')
-rw-r--r--examples/learn/35-io.out3
-rw-r--r--examples/learn/35-io.zc7
2 files changed, 10 insertions, 0 deletions
diff --git a/examples/learn/35-io.out b/examples/learn/35-io.out
new file mode 100644
index 0000000..9aa7f64
--- /dev/null
+++ b/examples/learn/35-io.out
@@ -0,0 +1,3 @@
+total: 42
+ratio: 0.250000
+done
diff --git a/examples/learn/35-io.zc b/examples/learn/35-io.zc
new file mode 100644
index 0000000..e370daa
--- /dev/null
+++ b/examples/learn/35-io.zc
@@ -0,0 +1,7 @@
+namespace;
+include std;
+fn main() {
+ std.Io.print("total: "); std.Io.put_n(6 * 7); std.Io.nl();
+ std.Io.print("ratio: "); std.Io.put_f(1.0 / 4.0); std.Io.nl();
+ std.Io.println("done");
+}