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


Groups > comp.lang.forth > #17151

Re: Genral advise and comments on callback style words

From Ouatu Bogdan <ouatubi@gmail.com>
Newsgroups comp.lang.forth
Subject Re: Genral advise and comments on callback style words
Date 2012-11-08 13:45 +0000
Organization A noiseless patient Spider
Message-ID <slrnk9ndne.knj.ouatubi@localhost.localdomain> (permalink)
References <2012110713421835115-chrishinsley@gmailcom> <0185e315-1855-415d-b981-638e4a2dabe5@googlegroups.com> <2012110813141528599-chrishinsley@gmailcom>

Show all headers | View raw


On 2012-11-08, Chris Hinsley <chris.hinsley@gmail.com> wrote:
> On 2012-11-07 21:04:20 +0000, humptydumpty said:
>> Building backward from EXECUTE and applying desired stack-effects,
>> I've got:
>> 
>> : HEAD ( lh -- ln )   ;
>> : SUCC ( ln -- ln' )  ;
>> 
>> 
>> \ xt ( u ln lh--R|0 )
>> : ENUMERATE     ( u xt lh -- R|0 )
>> ( u xt lh )             swap >R
>> ( u lh )                dup HEAD
>> ( u lh ln )
>>                         BEGIN
>> ( u lh ln   )                   dup SUCC dup 0=
>> ( u lh ln   ln' f )             IF  RDROP 2drop 2drop 0 EXIT THEN
>> ( u lh ln   ln' )               swap 2over
>> ( u lh ln'  ln u lh )           rot swap R@
>> ( u lh ln'  u ln lh xt )        EXECUTE dup
>> ( u lh ln'  R f=R )             IF  RDROP   nip nip nip EXIT THEN
>> ( u lh ln'  R )                 drop
>> ( u lh ln'  )           AGAIN
>> ;
>
> ?DUP after the EXECUTE ? Then avoid the drop after the THEN ? But then 
> your looking at a taken branch to an abolute jump !
>
>> ( u lh ln'  u ln lh xt )        EXECUTE ?dup
>> ( u lh ln'  R f=R )             IF  RDROP   nip nip nip EXIT THEN
>> ( u lh ln'  )           AGAIN
>> ;
>
> Chris
>
Hi!

Where dou see word `?dup' used in code I posted?

Have a nice day,
humptydumpty

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


Thread

Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-07 13:42 +0000
  Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-07 13:51 +0000
    Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-07 13:56 +0000
  Re: Genral advise and comments on callback style words anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-07 13:55 +0000
    Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-07 15:29 +0000
      Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-07 15:35 +0000
    Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-07 15:32 +0000
    Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-07 15:37 +0000
      Re: Genral advise and comments on callback style words anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-08 16:31 +0000
        Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 17:02 +0000
          Re: Genral advise and comments on callback style words anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-08 17:07 +0000
          Re: Genral advise and comments on callback style words Mark Wills <forthfreak@gmail.com> - 2012-11-09 01:16 -0800
    Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-07 15:41 +0000
      Re: Genral advise and comments on callback style words anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-08 16:39 +0000
  Re: Genral advise and comments on callback style words Brad Eckert <hwfwguy@gmail.com> - 2012-11-07 08:07 -0800
    Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 12:52 +0000
  Re: Genral advise and comments on callback style words humptydumpty <ouatubi@gmail.com> - 2012-11-07 13:04 -0800
    Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 13:04 +0000
      Re: Genral advise and comments on callback style words Mark Wills <forthfreak@gmail.com> - 2012-11-08 06:34 -0800
        Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 14:40 +0000
    Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 13:14 +0000
      Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 13:23 +0000
      Re: Genral advise and comments on callback style words Ouatu Bogdan <ouatubi@gmail.com> - 2012-11-08 13:45 +0000
        Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 13:59 +0000
        Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 14:02 +0000
          Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 15:35 +0000
            Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 16:24 +0000
              Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 16:39 +0000
                Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 16:57 +0000
                Re: Genral advise and comments on callback style words "Elizabeth D. Rather" <erather@forth.com> - 2012-11-08 07:56 -1000
  Re: Genral advise and comments on callback style words Josh Grams <josh@qualdan.com> - 2012-11-08 13:54 +0000
    Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 14:06 +0000
      Re: Genral advise and comments on callback style words Josh Grams <josh@qualdan.com> - 2012-11-08 18:04 +0000
        Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 19:36 +0000
        Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 19:38 +0000
          Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 19:42 +0000
    Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 14:11 +0000
      Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 14:31 +0000
        Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 14:51 +0000
          Re: Genral advise and comments on callback style words Josh Grams <josh@qualdan.com> - 2012-11-08 18:23 +0000
            Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 19:57 +0000
            Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 20:04 +0000
              Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 20:17 +0000
                Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 20:29 +0000
                Re: Genral advise and comments on callback style words Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-08 20:50 +0000

csiph-web