How do I write a "comment" containing a period (.) In Brainfuck?
1 answer
Here's a trick you can use: the loop will not execute what's inside unless it is executed and syntactically appropriate.
[This is a comment.]+++++++++++++++++++++++++++++++.
Indeed, if you don't specify []
, this will print too many NUL bytes. You still can't use parentheses though;)
This is similar to the shell construction:
if false; then
this is a comment
fi
+4
source to share