Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BUILDS>

6 views
Skip to first unread message

MarkWills

unread,
Jan 3, 2010, 6:19:04 AM1/3/10
to
Just interested in how the old BUILDS> word works.

I'm aware of DOES> obviously, but it seems that BUILDS> was replaced
in favour in DOES>

What is the difference between them? Does any one have an advantage
over the other?

Just curious.

Mark

a...@littlepinkcloud.invalid

unread,
Jan 3, 2010, 6:51:04 AM1/3/10
to

We had a discussion on precisely this subject just a few weeks ago.

There are two forms: the old

<BUILDS ... DOES>

and the newer

CREATE ... DOES>

Basically, BUILDS> needs an extra level of indirection, so as well as
the code field of the child word there is a pointer (to high level
code) in the parameter field. CREATE DOES> doesn't require that extra
level of indirection: it was invented after <BUILDS DOES> when it was
realized that the extra indirection was unnecessary. For various
reasons some implementations of CREATE DOES> still use the extra
indirection.

The (rather rambling) discussion starts at
http://groups.google.com/group/comp.lang.forth/msg/5930aee2349a89f0

Andrew.

MarkWills

unread,
Jan 3, 2010, 7:04:09 AM1/3/10
to
On Jan 3, 11:51 am, <a...@littlepinkcloud.invalid> wrote:

Thank you Andrew. I must have missed that discussion the first time.
I'll have a look now!

Thanks again

Mark

0 new messages