Re: Forth Frustrations



On Apr 9, 2:34 pm, "Bruce McFarling" <agil...@xxxxxxxxxxxx> wrote:
On Apr 8, 8:58 pm, "J Thomas" <jethom...@xxxxxxxxx> wrote:

[Postscript]

DEFINE associates an xt with a name form the names stack.
\SQUARE { DUP * } DEFINE
Currently the way I'm doing it is
:: DUP * ;
ACTION: SQUARE

I don't see the reason for separating ; and ACTION: if you
have a parsing definition word.

:: DUP * ;: SQUARE

You may easily be right. I'm thinking of three different kinds of
words, and I don't know whether each of them should provide an xt (and
only an xt) to the dictionary, or whether it makes sense to allow a
difference at the dictionary level among them. So I'm thinking in
terms of distinguishing among them more than in terms of the ideal
syntax at this point. What you're doing looks very nice.

It makes logical sense to have a word that doesn't parse. But I can't
see writing

:: DUP * ; S" SQUARE" NAMED!

The extra S" " bother me because I'm used to something different.
Maybe with practice I'll see that it's better that way.

.