VocabularysyntaxSyntax:: word ( vars... -- outputs... ) body... ;
Word descriptionDefines a word with named inputs. The word binds its input values to lexical variables from left to right, then executes the body with those bindings in scope.
If any
var name is followed by an exclamation point (
! ), the corresponding new variable is made mutable. See
Mutable lexical variables for more information.
NotesThe names of the
outputs do not affect the word's behavior. However, the compiler verifies that the stack effect accurately represents the number of outputs as with
: definitions.
ExamplesSee
Examples of lexical variables.
Definition