about summary refs log tree commit diff
path: root/examples/cat.ccl
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2025-04-15 16:37:59 +0300
committerNakidai <nakidai@disroot.org>2025-04-15 16:37:59 +0300
commit1255e343c24af52279cc78b2e2c7879dd1995ed1 (patch)
tree093d145980ab5ff391f8e6ae2a98f70e7331031d /examples/cat.ccl
parent941b5b19de78342af7018e6d0c90a73dcd946457 (diff)
download3cl-1255e343c24af52279cc78b2e2c7879dd1995ed1.tar.gz
3cl-1255e343c24af52279cc78b2e2c7879dd1995ed1.zip
Add cat.ccl example
Diffstat (limited to 'examples/cat.ccl')
-rw-r--r--examples/cat.ccl7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/cat.ccl b/examples/cat.ccl
new file mode 100644
index 0000000..2f4028f
--- /dev/null
+++ b/examples/cat.ccl
@@ -0,0 +1,7 @@
+^=c / create variable for storing input
+^- / push -1 (EOF) on the stack
+_ (
+    >c   / input
+    c?#; / if c is -1 then exit
+    <c   / output
+)