aboutsummaryrefslogtreecommitdiff
path: root/examples/strings.zc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/strings.zc')
-rw-r--r--examples/strings.zc13
1 files changed, 8 insertions, 5 deletions
diff --git a/examples/strings.zc b/examples/strings.zc
index 0959ceb..7101996 100644
--- a/examples/strings.zc
+++ b/examples/strings.zc
@@ -1,8 +1,11 @@
-fn main() {
+namespace;
+include rt;
+
+void main() {
let name = b"zc";
let hi = b"hello, " + name;
- put_s(hi); put_c(10);
- put_n(len(hi)); put_c(32);
- put_n(s_to_n(b"40") + 2); put_c(10);
- return 0;
+ rt.put_s(hi); rt.put_c(10);
+ rt.put_n(len(hi)); rt.put_c(32);
+ rt.put_n(rt.s_to_n(b"40") + 2); rt.put_c(10);
+ return;
}