It is usually presented as [interpreted](interpreter.md) language but may as well be [compiled](compiler.md), in fact it maps pretty nicely to [assembly](assembly.md).
There are several Forth standard, most notably ANSI Forth from 1994.
A free interpreter is e.g. GNU Forth ([gforth](gforth.md)).
## Language
The language is case-insensitive.
The language operates on an evaluation **stack**: e.g. the operation + takes the two values at the top of the stack, adds them together and pushed the result back to the stack. Besides this there are also some "advanced" features like variables living outside the stack, if you want to use them.
The stack is composed of **cells**: the size and internal representation of the cell is implementation defined. There are no data types, or rather everything is just of type signed int.
Basic abstraction of Forth is so called **word**: a word is simply a string without spaces like `abc` or `1mm#3`. A word represents some operation on stack (and possible other effect such as printing to the console), for example the word `1` adds the number 1 on top of the stack, the word `+` performs the addition on top of the stack etc. The programmer can define his own words which can be seen as "functions" or rather procedures or macros (words don't return anything or take any arguments, they all just invoke some operations on the stack). A word is defined like this:
```
: myword operation1 operation2 ... ;
```
For example a word that computes and average of the two values on top of the stack can be defined as: