Next: , Previous: Anonymous Definitions, Up: Defining Words

5.9.7 Supplying the name of a defined word

By default, a defining word takes the name for the defined word from the input stream. Sometimes you want to supply the name from a string. You can do this with:

nextname       c-addr u –         gforth       “nextname”

The next defined word will have the name c-addr u; the defining word will leave the input stream alone.

For example:

     s" foo" nextname create

is equivalent to:

     create foo

nextname works with any defining word.