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
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.
Thank you Andrew. I must have missed that discussion the first time.
I'll have a look now!
Thanks again
Mark