# Minus Basics

Minus Home
What is Minus?
Basics
Proof of Concept
Extensions
Implementations
Examples
Files
Self Interpreter

In the minimalist version of Minus there is only one operator, and that is -=, which subtracts the second argument from the first.

For example if 'd' is 10 and 'e' is 4 then d-=e sets d to 6. Minus allows for the first operand to be any letter and the second operand to be any letter or a series of numbers. It is not actually necessary to accept numbers in addition to variables to become Turing complete, but it just makes the programmer's job easier.

This one operator is not enough to allow the language to do anything useful. It relies on special variables to become Turing complete. Here is a list of the basic special variables.

 var description example effect c Location of current statement of execution. You can modify it to loop. It is incremented by 1 after every instruction. c-=1 An infinite loop. A-Z Capital letters deference the infinite array. To be Turing complete only 1 is needed, but having more is handy. C-=5 Subtract 5 from Memory[p+2] (2 because C is 2 more than A) p Index in an infinite array. p-=3;F-=F Moves p to the left 3, making F now point to where C was, so this code would now set F to -8 since it was at -5 from the previous example. o Output that byte mod 256. o-=246 Prints a newline (ascii value 10). i Inputs a byte and returns it. (EOF = -1) a-=i Same as a-=100 if the user inputs 'd' (ascii value 100).

Note that since the syntax is so simple the -= and ; are not really needed to deduce the meaning of code, they are therefor optional. And actually some unfinished interpreters require they aren't there!

Continue on to some useful extensions

Or see a simple proof that this language is Turing complete