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


Groups > comp.lang.forth > #28095

Re: quick review of <BUILDS and CREATE history

From Bernd Paysan <bernd.paysan@gmx.de>
Newsgroups comp.lang.forth
Subject Re: quick review of <BUILDS and CREATE history
Date 2014-01-25 21:41 +0100
Organization 1&1 Internet AG
Message-ID <lc17ii$ej5$1@online.de> (permalink)
References (10 earlier) <0LednZCfW8pHNHzPnZ2dnUVZ_rWdnZ2d@supernews.com> <lbts37$nq7$2@online.de> <2014Jan25.161819@mips.complang.tuwien.ac.at> <lc12m8$5u1$1@online.de> <fpsjk5c4t0y8$.rf65utdvaj0w$.dlg@40tude.net>

Show all headers | View raw


Coos Haak wrote:
>> Ok, POSTPONE did work all right (we had to), but now you can also use [']
>> RECURSE to get the xt of the current definition (which normally isn't
>> that
>> easy...).  You can also have TO or IS RECURSE, if the currently defined
>> word has an IS or TO action (usually it won't have one, though ;-).
> 
> Example?

For the ['] part, an example is fairly easy.  Let's say you want to display 
something, and there' a deferred word which causes a redisplay when a redraw 
is necessary:

: draw-foo ( -- ) ['] recurse is redraw
  <things to draw a foo> ;

Then after draw-foo, it will not only draw it now, but also whenever there's 
a redraw necessary.

TO and IS for normal words?  Not very likely, but think of a method:

m: foo ( xt -- ) change-behavior? IF is recurse ELSE drop THEN ;m

That assumes that you can assign new behavior to a method with IS or TO (in 
current git Gforth, they do the same thing).

m: would create something with a TO/IS action.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

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


Thread

quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-19 13:15 -0500
  Re: quick review of <BUILDS and CREATE history albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-01-19 20:07 +0000
    Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-19 21:45 +0000
  Re: quick review of <BUILDS and CREATE history Coos Haak <chforth@hccnet.nl> - 2014-01-19 22:02 +0100
  Re: quick review of <BUILDS and CREATE history Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-01-19 17:24 -0600
    Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-19 14:54 -1000
      Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-19 22:37 -0500
        Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-19 18:01 -1000
          Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-20 00:27 -0500
            Re: quick review of <BUILDS and CREATE history Elizabeth D Rather <erather@forth.com> - 2014-01-19 20:54 -1000
              Re: quick review of <BUILDS and CREATE history Elizabeth D Rather <erather@forth.com> - 2014-01-19 21:19 -1000
              Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-20 16:14 -0500
                Re: quick review of <BUILDS and CREATE history Elizabeth D Rather <erather@forth.com> - 2014-01-20 12:07 -1000
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-21 11:37 -0500
                Re: quick review of <BUILDS and CREATE history albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-01-21 17:41 +0000
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-21 08:30 -1000
                Re: quick review of <BUILDS and CREATE history oh2aun@gmail.com - 2014-01-21 11:17 -0800
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-21 09:44 -1000
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-21 15:18 -0500
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-21 12:07 -1000
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-21 22:04 -0500
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-21 19:21 -1000
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-22 13:38 +0000
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-22 08:50 -1000
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-23 17:17 -0500
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-23 13:46 -1000
                Re: quick review of <BUILDS and CREATE history Bernd Paysan <bernd.paysan@gmx.de> - 2014-01-24 15:07 +0100
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-25 15:18 +0000
                Re: quick review of <BUILDS and CREATE history Bernd Paysan <bernd.paysan@gmx.de> - 2014-01-25 20:18 +0100
                Re: quick review of <BUILDS and CREATE history Coos Haak <chforth@hccnet.nl> - 2014-01-25 20:44 +0100
                Re: quick review of <BUILDS and CREATE history Bernd Paysan <bernd.paysan@gmx.de> - 2014-01-25 21:41 +0100
                Re: quick review of <BUILDS and CREATE history "Alex McDonald" <blog@rivadpm.com> - 2014-01-25 22:47 +0000
                Re: quick review of <BUILDS and CREATE history Bernd Paysan <bernd.paysan@gmx.de> - 2014-01-26 01:54 +0100
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-27 16:49 +0000
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-27 15:40 +0000
                Re: quick review of <BUILDS and CREATE history Bernd Paysan <bernd.paysan@gmx.de> - 2014-01-27 23:00 +0100
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-27 19:43 -0500
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-28 09:25 +0000
                Re: quick review of <BUILDS and CREATE history Bernd Paysan <bernd.paysan@gmx.de> - 2014-01-28 19:45 +0100
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-30 15:32 +0000
                Re: quick review of <BUILDS and CREATE history albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-01-28 14:20 +0000
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-25 15:28 +0000
                Re: quick review of <BUILDS and CREATE history Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-01-25 13:51 -0600
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-27 15:34 +0000
                Re: quick review of <BUILDS and CREATE history Lars Brinkhoff <lars.spam@nocrew.org> - 2014-01-24 08:11 +0100
                Re: quick review of <BUILDS and CREATE history Mark Wills <markrobertwills@yahoo.co.uk> - 2014-01-24 01:28 -0800
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-24 05:00 -0500
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-24 09:32 -1000
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-24 17:48 -0500
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-24 13:14 -1000
                Re: quick review of <BUILDS and CREATE history Mark Wills <markrobertwills@yahoo.co.uk> - 2014-01-24 16:16 -0800
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-02-23 12:13 -0500
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-22 13:32 +0000
            Re: quick review of <BUILDS and CREATE history Mark Wills <markrobertwills@yahoo.co.uk> - 2014-01-20 04:14 -0800
              Re: quick review of <BUILDS and CREATE history Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-01-20 06:31 -0600
                Re: quick review of <BUILDS and CREATE history Elizabeth D Rather <erather@forth.com> - 2014-01-20 08:04 -1000
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-21 14:09 +0000
              Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-20 16:14 -0500
  Re: quick review of <BUILDS and CREATE history trebor.english@gmail.com - 2014-01-22 17:44 -0800
  Re: quick review of <BUILDS and CREATE history trebor.english@gmail.com - 2014-01-22 18:24 -0800
    Re: quick review of <BUILDS and CREATE history albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-01-23 14:00 +0000
      Re: quick review of <BUILDS and CREATE history trebor.english@gmail.com - 2014-01-23 11:06 -0800
        Re: quick review of <BUILDS and CREATE history Paul Rubin <no.email@nospam.invalid> - 2014-01-23 11:33 -0800
          Re: quick review of <BUILDS and CREATE history trebor.english@gmail.com - 2014-01-23 11:42 -0800
        Re: quick review of <BUILDS and CREATE history Mikael Nordman <oh2aun@gmail.com> - 2014-01-23 11:51 -0800

csiph-web