Data Structure and Syntax
DotSF uses single character commands read from left to right. DotSF's only data structure is a stack of 32 bit integers with a maximum depth of 30000, a feature inspired by brainfuck's character cell count.
- 0~9: push the corresponding integer onto the stack
- +: pops A then B off the stack then pushes A+B onto the stack
- -: pops A then B off the stack then pushes A-B onto the stack
- *: pops A then B off the stack then pushes A*B onto the stack
- /: pops A then B off the stack then pushes A/B onto the stack
- %: pops A then B off the stack then pushes A(mod)B onto the stack
- _: pops top value off stack then pushes two copies of the value onto the stack
- . takes input as an integer
- , takes input as a character
- : pops the top value and outputs it as an integer
- ; pops the top value and outputs it as a character
- [ and ]: [ pops the top value off the stack if the popped value is 0, skips to the next ] otherwise continues as normal
- A~Z: defines a label
- a~z: jumps to the corresponding label when reached, jumping to the same label more than 1000 times in a row throws an error.
The tip command, "$" has no function within the program but is necessary to include as the interpreter, known as "Agatha" wants compensation for it's work. This feature was inspired by Intercal's "PLEASE" command. the tip command should make up at least 1/10 of the source code but not more than 1/5.
- Note that your source contains one invisible tip command by default
- Also note that this means a source of less than 5 Bytes will always throw an error
counts down from 99 to 1 (99 bottles of beer w/o lyrics)