Node:Name token, Previous:Compilation token, Up:Tokens for Words



Name token

Gforth represents named words by the name token, (nt). In Gforth, the abstract data type name token is implemented as a name field address (NFA).

find-name       c-addr u -- nt | 0         gforth       ``find-name''
Find the name c-addr u in the current search order. Return its nt, if found, otherwise 0.
name>int       nt -- xt         gforth       ``name>int''
xt represents the interpretation semantics of the word nt. If nt has no interpretation semantics (i.e. is compile-only), xt is the execution token for ticking-compile-only-error, which performs -2048 throw.
name?int       nt -- xt         gforth       ``name?int''
Like name>int, but perform -2048 throw if nt has no interpretation semantics.
name>comp       nt -- w xt         gforth       ``name>comp''
w xt is the compilation token for the word nt.
name>string       nt -- addr count         gforth       ``head-to-string''
addr count is the name of the word represented by nt.
id.       nt --         gforth       ``id.''
Print the name of the word represented by nt.
.name       nt --         unknown       ``.name''
Gforth <=0.5.0 name for id..
.id       nt --         unknown       ``.id''
F83 name for id..