Go to the first, previous, next, last section, table of contents.


Notation

The Forth words are described in this section in the glossary notation that has become a de-facto standard for Forth texts, i.e.,

word     Stack effect   wordset   pronunciation

Description

word
The name of the word. BTW, Gforth is case insensitive, so you can type the words in in lower case (However, see section Implementation Defined Options).
Stack effect
The stack effect is written in the notation before -- after, where before and after describe the top of stack entries before and after the execution of the word. The rest of the stack is not touched by the word. The top of stack is rightmost, i.e., a stack sequence is written as it is typed in. Note that Gforth uses a separate floating point stack, but a unified stack notation. Also, return stack effects are not shown in stack effect, but in Description. The name of a stack item describes the type and/or the function of the item. See below for a discussion of the types. All words have two stack effects: A compile-time stack effect and a run-time stack effect. The compile-time stack-effect of most words is -- . If the compile-time stack-effect of a word deviates from this standard behaviour, or the word does other unusual things at compile time, both stack effects are shown; otherwise only the run-time stack effect is shown.
pronunciation
How the word is pronounced.
wordset
The ANS Forth standard is divided into several wordsets. A standard system need not support all of them. So, the fewer wordsets your program uses the more portable it will be in theory. However, we suspect that most ANS Forth systems on personal machines will feature all wordsets. Words that are not defined in the ANS standard have gforth or gforth-internal as wordset. gforth describes words that will work in future releases of Gforth; gforth-internal words are more volatile. Environmental query strings are also displayed like words; you can recognize them by the environment in the wordset field.
Description
A description of the behaviour of the word.

The type of a stack item is specified by the character(s) the name starts with:

f
Boolean flags, i.e. false or true.
c
Char
w
Cell, can contain an integer or an address
n
signed integer
u
unsigned integer
d
double sized signed integer
ud
double sized unsigned integer
r
Float (on the FP stack)
a_
Cell-aligned address
c_
Char-aligned address (note that a Char may have two bytes in Windows NT)
f_
Float-aligned address
df_
Address aligned for IEEE double precision float
sf_
Address aligned for IEEE single precision float
xt
Execution token, same size as Cell
wid
Wordlist ID, same size as Cell
f83name
Pointer to a name structure
"
string in the input stream (not on the stack). The terminating character is a blank by default. If it is not a blank, it is shown in <> quotes.


Go to the first, previous, next, last section, table of contents.