Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!border2.nntp.ams2.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 08 Nov 2012 07:14:15 -0600 From: Chris Hinsley Newsgroups: comp.lang.forth Date: Thu, 8 Nov 2012 13:14:15 +0000 Message-ID: <2012110813141528599-chrishinsley@gmailcom> References: <2012110713421835115-chrishinsley@gmailcom> <0185e315-1855-415d-b981-638e4a2dabe5@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: Genral advise and comments on callback style words User-Agent: Unison/2.1.9 Lines: 34 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-d8JHbsKW8TIpmZECdpyDNYiSlFcgWaGHICHE4K0SFi6zcu9FTU6qLLrvUcWVrXIwXhSpJWZiXxBHJPm!VH65AkE2aHLB7mBU44Zf1BWiD2FGXihMKR5OTWEwmanC75Vv9xatusORr4FELffJgMYf3rc= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2200 Xref: csiph.com comp.lang.forth:17149 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