Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #11915
| Newsgroups | comp.lang.forth |
|---|---|
| From | Albert van der Horst <albert@spenarnc.xs4all.nl> |
| Subject | Re: Distinguishing DOES> |
| Date | 2012-05-04 12:37 +0000 |
| Message-ID | <m3i0dr.87k@spenarnc.xs4all.nl> (permalink) |
| Organization | Dutch Forth Workshop |
| References | <3614770.3.1336060788880.JavaMail.geo-discussion-forums@yngr14> |
In article <3614770.3.1336060788880.JavaMail.geo-discussion-forums@yngr14>,
JennyB <jennybrien@googlemail.com> wrote:
>I have often seen implementation-dependent code to test if a given xt belon=
>gs to the child of a particular defining work. It seems to me that, given s=
>ufficient carnal knowledge, this should be possible in any Forth. The most =
>usual technique is to define a prototype and then compare the contents of t=
>he xts.
>
>So in any Forth it should be possible to write:
>
>: HUMAN CREATE ... DOES> ... ;
>
>Human ALICE
>' Bob ' Alice like? \ true if Bob is HUMAN
>
>Is it?
>Is it possible (and worthwhile) to remove the need for a prototype by redef=
>ining the defining word?
I have such a technique in my assembler where I have an immediate
word REMEMBER that remembers the compilation address at DOES>
: <assembler-consitutent> .. CREATE .. DOES> REMEMBER .... ;
..
<data> OPCODE MOV,
and later
' MOV, IS-OPCODE
I like
' MOV, ' OPCODE child-of
better than my solution (where I have a comparison word for
each defining word.)
A standardised child-of would be better.
Groetjes Albert
--
--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Distinguishing DOES> JennyB <jennybrien@googlemail.com> - 2012-05-03 08:59 -0700
Re: Distinguishing DOES> Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-05-03 17:23 -0700
Re: Distinguishing DOES> Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2012-05-04 10:47 +0100
Re: Distinguishing DOES> Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-04 05:12 -0500
Re: Distinguishing DOES> anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-04 11:33 +0000
Re: Distinguishing DOES> Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-04 08:11 -0500
Re: Distinguishing DOES> anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-04 16:18 +0000
Re: Distinguishing DOES> Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-05 02:02 -0500
Re: Distinguishing DOES> anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-05 14:16 +0000
Re: Distinguishing DOES> Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-06 02:53 -0500
Re: Distinguishing DOES> anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-05 14:25 +0000
Re: Distinguishing DOES> BruceMcF <agila61@netscape.net> - 2012-05-05 08:07 -0700
Re: Distinguishing DOES> Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-05-08 06:23 -0700
Re: Distinguishing DOES> Bernd Paysan <bernd.paysan@gmx.de> - 2012-05-09 00:25 +0200
Re: Distinguishing DOES> Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-05-09 01:26 -0700
Re: Distinguishing DOES> Mark Wills <markrobertwills@yahoo.co.uk> - 2012-05-09 03:18 -0700
Re: Distinguishing DOES> Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-09 05:29 -0500
Re: Distinguishing DOES> "Elizabeth D. Rather" <erather@forth.com> - 2012-05-09 07:11 -1000
Re: Distinguishing DOES> Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2012-05-09 22:48 +0100
Re: Distinguishing DOES> Bernd Paysan <bernd.paysan@gmx.de> - 2012-05-09 23:22 +0200
Re: Distinguishing DOES> Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2012-05-09 23:43 +0100
Re: Distinguishing DOES> Bernd Paysan <bernd.paysan@gmx.de> - 2012-05-10 00:49 +0200
Re: Distinguishing DOES> Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2012-05-10 11:33 +0100
Re: Distinguishing DOES> Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-05-10 10:02 +0000
Re: Distinguishing DOES> Bernd Paysan <bernd.paysan@gmx.de> - 2012-05-10 15:13 +0200
Re: Distinguishing DOES> Mark Wills <markrobertwills@yahoo.co.uk> - 2012-05-10 05:07 -0700
Re: Distinguishing DOES> Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-05-10 22:57 -0700
Re: Distinguishing DOES> Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-05-04 12:37 +0000
Re: Distinguishing DOES> Doug Hoffman <glidedog@gmail.com> - 2012-05-04 10:14 -0400
Re: Distinguishing DOES> humptydumpty <ouatubi@gmail.com> - 2012-05-04 20:27 +0000
Re: Distinguishing DOES> Doug Hoffman <glidedog@gmail.com> - 2012-05-05 06:16 -0400
Re: Distinguishing DOES> JennyB <jennybrien@googlemail.com> - 2012-05-05 07:19 -0700
Re: Distinguishing DOES> anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-05 14:55 +0000
Re: Distinguishing DOES> JennyB <jennybrien@googlemail.com> - 2012-05-07 07:24 -0700
Re: Distinguishing DOES> Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-05-06 11:04 +0000
Re: Distinguishing DOES> Doug Hoffman <glidedog@gmail.com> - 2012-05-06 07:47 -0400
Re: Distinguishing DOES> ward@megawolf.com - 2012-05-08 04:39 -0700
Re: Distinguishing DOES> Doug Hoffman <glidedog@gmail.com> - 2012-05-08 07:50 -0400
Re: Distinguishing DOES> Hans Bezemer <the.beez.speaks@gmail.com> - 2012-05-05 14:24 +0200
Re: Distinguishing DOES> Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-05-06 11:09 +0000
csiph-web