The title says it all. Your goal is to write a program that forms a w×h rectangle of characters that can be rotated and re-run to output the number of 90° Counter-Clockwise (CCW) rotations that have been done.
For example, if the 3×2 program
abc
def
solved the problem, it would initially output 0, and successive rotations of 90° CCW
cf fed da
be cba eb
ad fc
would output 1, 2, and 3 respectively.
Using comments makes this a trivial task is most languages. In Ruby for example, it can be done in a 7×7 rectangle:
###p###
### ###
###1###
p 0#2 p
###3###
### ###
###p###
The challenge is to do this without any sort of comments.
Scoring
Your score is w*h, the area of your rectangle. Newlines are excluded. In other words, code-golf, newlines not counted.
The score for the Ruby example is 49 (though of course it is invalid since it has comments).
Notes
- Your code must really be rectangular with no missing characters at the end of lines.
- If you wish you may output other legal "mod 90°" values instead of 0 1 2 3. So 8 is fine instead of 0, and -1 is fine instead of 3, etc.
- The output may go to the console or into a file.
- Standard loopholes apply.
I hope this, my first question, really intrigues some people. Enjoy!
echo 0;exit;e
in bash is allowed? \$\endgroup\$