Stack comments

Although i rarely use stack comments in code, they are very convenient when writing a manual.
Below is the stack comments i use in this manual.

Stack comments are written between '(' and ')' as in:
: + ( n1 n2 -- n3 ) ... ;

The 'n1 n2' part is the stack before the word is called, they are arguments.
The 'n3' part is the stack after the word has returned, this is the output.

The stack notation used in this manual is listed below.
SYMBOL SIZE IN CELLS NOTE
n 1 signed integer
u 1 unsigned integer
f 1 flag
xt 1 execution token
ca 1 packed string
za 1 zero terminated string
# 1 unsigned integer used as count
a 1 memory address
x 1 cell (type does not matter)
dx 2 double cell (type does not matter)
c 1 char

The ':' notation
Example:
: >R ( u -- ; r: -- u ) ;
This shows that '>R' takes one integer from the data stack and places it one the return stack ('r' for return stack).

The '|' notation
Example:
: MAX ( n1 n2 -- n1 | n2 ) ;
Here the '|' char indicated 'OR', so 'MAX' takes 2 arguments n1 and n2 and leaves n1 OR n2.