Files
stacat/notes.md
2025-06-14 00:29:53 +02:00

33 lines
802 B
Markdown

Syntax:
>: pushes 1 onto the stack
^: clones the current value onto the stack
+: pops the stack twice and pushes the sum onto the stack
-: pops the stack twice and pushes the difference onto the stack
*: pops the stack twice and pushes the product onto the stack
#: pops the stack and repeats the next operation n times
!: pops the stack and outputs n as an ASCII character to the standard output
?: pushes the next character from the standard input onto the stack
_: start line comment
Präprozessorbefehle?! "A()"
Unused: " $ & ' ( ) , . : ; = @ [ \ ] ` { | }
Number examples:
1 >
2 >^+
3 >^+>+
4 >^+^+
5 >^+^+>+
6 >^+^>+*
7 >^+^>+*>+
8 >^+^+^+
9 >^+>+^*
10 >^+>+^*>+
72 >^+>+^*>^+^+^+*