aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor <pashev.igor@gmail.com>2010-01-18 00:38:04 +0300
committerIgor <pashev.igor@gmail.com>2010-01-18 00:38:04 +0300
commit595ad985c74837287493fffe680ae9c93d6059cb (patch)
tree2e7fc2459700a2e04ec2ca27e38081c20b412ea3
parentdb42e0b94103acabdfd46f43e3b912e50434eb06 (diff)
downloadbrainfuck-595ad985c74837287493fffe680ae9c93d6059cb.tar.gz
One more short example
-rw-r--r--README1
-rw-r--r--brainfuck.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/README b/README
index 920b990..c93f267 100644
--- a/README
+++ b/README
@@ -30,3 +30,4 @@ Extensions:
Example:
echo '+++[.-]' | ./brainfuck # count down from 3 to 0
echo ',+++.;5' | ./brainfuck # shows 8
+ echo ',>,<[->+<]>.;4 5' | ./brainfuck # shows 4+5=9
diff --git a/brainfuck.c b/brainfuck.c
index 9472d56..de5f703 100644
--- a/brainfuck.c
+++ b/brainfuck.c
@@ -230,6 +230,7 @@ void usage(char * self)
printf("Example:\n");
printf(" echo '+++[.-]' | %s # count down from 3 to 0\n", self);
printf(" echo ',+++.;5' | %s # shows 8\n", self);
+ printf(" echo ',>,<[->+<]>.;4 5' | %s # shows 4+5=9\n", self);
exit(EXIT_SUCCESS);
}