LOCALS-EXT Locals + extensions
The Portable Forth Environment does implement locals
in such an extended form as that additional variable
names can be declared anywhere in the compiled word.
(LOCAL) ( strptr strcnt -- )
- smart-word ansi 13.6.1.0086
this word is used to create compiling words that can
LOCALS| - it shall not be used directly
to declare a local, the pfe provides
that a purpose beyond
reference: p4_paren_local in ../src/locals.c:0157, export CS (LOCAL)
LOCALS| name1 name2 ... nameN | ( xN ... x2 x1 -- )
- smart-word ansi 184.108.40.2065
create local identifiers to be used in the current definition.
At runtime, each identifier will be assigned a value from
the parameter stack.
The identifiers may be treated as if being a
VALUE , it does
also implement the ansi
TO extensions for locals. Note that
the identifiers are only valid inside the currently compiled
SEE decompiled word will show them as
reference: p4_locals_bar in ../src/locals.c:0177, export CS LOCALS|
LVALUE name ( value -- )
declares a single local
(LOCAL) - a
LVALUE declarations can replace a
LOCALS| argument, ie.
LOCALS| a b c |
is the same as
LVALUE a LVALUE b LVALUE c .
This should also clarify the runtime stack behaviour of
LOCALS| where the stack parameters seem to be
assigned in reverse order as opposed to their textual
VALUE and the pfe's convenience word
reference: p4_local_value in ../src/locals.c:0205, export CS LVALUE