Update
This commit is contained in:
parent
9fc5ae8d5b
commit
275c83d379
27 changed files with 1857 additions and 1819 deletions
2
forth.md
2
forth.md
|
@ -24,7 +24,7 @@ The language operates on an evaluation **[stack](stack.md)**: e.g. the operation
|
|||
|
||||
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](function.md)" 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:
|
||||
Basic [abstraction](abstraction.md) 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](function.md)" 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 ... ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue