This section documents the words used for defining locals. Note that
the run-times for the words (like W:) that define a local are
performed from the rightmost defined local to the leftmost defined
local, such that the rightmost local gets the top of stack.
Start locals definitions.
During a locals definitions with {: everything from
-- to :} is ignored. This is typically used
when you want to make a locals definition serve double duty as
a stack effect description.
Locals defined behind | are not initialized from the
stack; so the run-time stack effect of the locals definitions
after | is ( -- ).
Ends locals definitions.
Start locals definitions. The Forth-2012 standard name for this
word is {:.
Ends locals definitions. The Forth-2012 standard name for this
word is :}.
Don’t use ‘locals| this read can't you|’! Use {:
you can read this :} instead.! A portable and free {:
implementation can be found in compat/xlocals.fs.
Define value-flavoured cell local name ( -- x1 )
Define variable-flavoured cell local name ( -- a-addr )
Define value-flavoured double local name ( -- x3 x4 )
Define variable-flavoured double local name ( -- a-addr )
Define value-flavoured char local name ( -- c1 )
Define variable-flavoured char local name ( -- c-addr )
Define value-flavoured float local name ( -- r1 )
Define variable-flavoured float local name ( -- f-addr )
Define value-flavoured complex local name ( -- z1 )
Define defer-flavoured cell local name ( ... -- ... )
Note that |, -- and :} are not normally in the
search order (they are in the vocabulary locals-types), and on
some Forth systems they may not even be words (and the standard
documents them under {:, not as separate word). } is
also in locals-types.