The defining word
Alias allows you to define a word by name that
has the same behaviour as some other word. Here are two situation where
this can be useful:
Rootword list in the Gforth source).
Like deferred words, an alias has default compilation and interpretation
semantics at the beginning (not the modifications of the other word),
but you can change them in the usual ways (
compile-only). For example:
: foo ... ; immediate ' foo Alias bar \ bar is not an immediate word ' foo Alias fooby immediate \ fooby is an immediate word
Words that are aliases have the same xt, different headers in the
dictionary, and consequently different name tokens (see Tokens for Words) and possibly different immediate flags. An alias can only have
default or immediate compilation semantics; you can define aliases for
combined words with
interpret/compile: – see Combined Words.
Alias( xt "name" – ) gforth-0.4 “Alias”