Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #33787

Re: Can every Forth do this?

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: Can every Forth do this?
Date 2014-10-09 15:26 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2014Oct9.172648@mips.complang.tuwien.ac.at> (permalink)
References <9b988010-d503-43f9-bb61-5407e919ac8a@googlegroups.com> <2014Oct7.181615@mips.complang.tuwien.ac.at> <a1d588be-ace9-4253-9496-ce119adef6d9@googlegroups.com>

Show all headers | View raw


november.nihal@gmail.com writes:
>This caught my attention as I wasn't aware this was possible, the ability to have several does> in a word.
>
>" [snipped ] ... 
>
>No, there may be several DOES> in a word, and CREATE and DOES> may be 
>in different words, and there may be several DOES> applied to the same 
>CREATEd word.  
>
>... [ snipped ]"
>
>Does anyone have any examples I could look at to understand ?

Actually useful exaple (but not sure whether you understand it):

<http://www.complang.tuwien.ac.at/forth/struct.fs>

Look at CREATE-FIELD, DOFIELD, DOZEROFIELD, and FIELD.

Simple contrived example:

: x ( f -- )
  does> drop ." a"
  does> drop ." b" ;

create a x
a
a
a
x
a
a
a

Have fun thinking it through:-)

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2014: http://www.euroforth.org/ef14/

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Can every Forth do this? JennyB <jennybrien@googlemail.com> - 2014-10-07 07:33 -0700
  Re: Can every Forth do this? Roger Levy <roger.levy@gmail.com> - 2014-10-07 08:58 -0700
  Re: Can every Forth do this? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-10-07 16:16 +0000
    Re: Can every Forth do this? november.nihal@gmail.com - 2014-10-08 06:17 -0700
      Re: Can every Forth do this? Mark Wills <markwills1970@gmail.com> - 2014-10-08 09:55 -0700
      Re: Can every Forth do this? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-10-09 15:26 +0000
        Re: Can every Forth do this? Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2014-10-09 19:42 +0100
  Re: Can every Forth do this? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-10-07 18:16 +0000
    Re: Can every Forth do this? Jason Damisch <jasondamisch@yahoo.com> - 2014-10-07 11:32 -0700
    Re: Can every Forth do this? Mark Wills <markwills1970@gmail.com> - 2014-10-07 14:27 -0700
      Re: Can every Forth do this? "Elizabeth D. Rather" <erather@forth.com> - 2014-10-07 13:38 -1000
        Re: Can every Forth do this? Mark Wills <markwills1970@gmail.com> - 2014-10-07 20:21 -0700
        Re: Can every Forth do this? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-10-08 11:33 +0000
          Re: Can every Forth do this? JennyB <jennybrien@googlemail.com> - 2014-10-08 06:25 -0700
            Re: Can every Forth do this? november.nihal@gmail.com - 2014-10-08 08:14 -0700
              Re: Can every Forth do this? Mark Wills <markwills1970@gmail.com> - 2014-10-08 10:10 -0700
                Re: Can every Forth do this? JennyB <jennybrien@googlemail.com> - 2014-10-08 11:42 -0700
                Re: Can every Forth do this? Roger Levy <roger.levy@gmail.com> - 2014-10-08 12:31 -0700
                Re: Can every Forth do this? JennyB <jennybrien@googlemail.com> - 2014-10-09 07:03 -0700
                Re: Can every Forth do this? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-10-08 19:33 +0000
                Re: Can every Forth do this? november.nihal@gmail.com - 2014-10-08 16:39 -0700
                Re: Can every Forth do this? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-10-08 23:45 +0000
          Re: Can every Forth do this? Harold <hzrabbie@gmail.com> - 2014-10-08 14:23 -0700
            Re: Can every Forth do this? "Elizabeth D. Rather" <erather@forth.com> - 2014-10-08 12:48 -1000
            Re: Can every Forth do this? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-10-08 23:39 +0000
        Re: Can every Forth do this? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-10-08 13:17 +0000
        Re: Can every Forth do this? Roger Levy <roger.levy@gmail.com> - 2014-10-08 07:33 -0700
          Re: Can every Forth do this? Roger Levy <roger.levy@gmail.com> - 2014-10-08 07:33 -0700
  Re: Can every Forth do this? Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2014-10-07 20:23 +0100

csiph-web