From d1a8792b18210794761801edd8559f8fc817e6c9 Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Sat, 16 Dec 2023 13:44:09 +0100 Subject: [PATCH] add double loop example program --- programs/cat.worm | 2 ++ programs/double_loop.worm | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 programs/double_loop.worm diff --git a/programs/cat.worm b/programs/cat.worm index 8f5bd16..08da105 100644 --- a/programs/cat.worm +++ b/programs/cat.worm @@ -1,2 +1,4 @@ +This program prints the input and exits when it has read everything. + @00000 11\ \!=?1/ diff --git a/programs/double_loop.worm b/programs/double_loop.worm new file mode 100644 index 0000000..1b87447 --- /dev/null +++ b/programs/double_loop.worm @@ -0,0 +1,21 @@ +This program alternates between two loops, running each one 8 times each. + +@00000v +v00000< +8 +8 ++ += ++ /2 \ + 8 = + 8 + + + + + + 8 + = 8 +> 1/ + 4 + + + + 3 + \=++88/ \ No newline at end of file