Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #41893
| From | Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: `don't` instead of `?do` |
| Date | 2015-09-09 11:53 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <msp6iu$fcs$1@speranza.aioe.org> (permalink) |
| References | <mskrip$5ff$1@speranza.aioe.org> <af592592-cf97-453d-bf3b-52f10586f629@googlegroups.com> |
En/Je/On 2015-09-08, Julian Fondren <julian.fondren@gmail.com> escribió/skribis/wrote: > On Monday, September 7, 2015 at 3:20:46 PM UTC-5, Marcos Cruz wrote: >> : don't ( n1 n2 -- | n1 n2 ) >> 2dup = if 2drop unnest unnest then ; > unnest ? > > : don't ( n n -- ) > 2dup = if 2drop r>drop r>drop then ; Right, `unnest` does `rdrop` (or `r>drop` in your case). > A more common word is ?DO , which does nothing if its arguments are > equal. > then DON'T is just a less versatile clone of ?DO ,which can be used > within a larger word Of course, I know. `don't` is *a simple alternative I wrote while I implement `?do`*, and only useful when the loop is in its own word, not in larger words, as you point out. I think my intention was not clear because, by mistake, the word `?do` was missing from the first sentence of my message: "I still haven't implemented `?do` in a Forth of mine." Regards, -- Marcos Cruz http://programandala.net
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
`don't` instead of `?do` Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> - 2015-09-07 20:20 +0000
Re: `don't` instead of `?do` Julian Fondren <julian.fondren@gmail.com> - 2015-09-08 11:32 -0700
Re: `don't` instead of `?do` Coos Haak <chforth@hccnet.nl> - 2015-09-09 00:38 +0200
Re: `don't` instead of `?do` Julian Fondren <julian.fondren@gmail.com> - 2015-09-08 15:52 -0700
Re: `don't` instead of `?do` Coos Haak <chforth@hccnet.nl> - 2015-09-09 00:58 +0200
Re: `don't` instead of `?do` Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> - 2015-09-09 11:53 +0000
Re: `don't` instead of `?do` Mark Wills <markwills1970@gmail.com> - 2015-09-09 08:48 -0700
Re: `don't` instead of `?do` Bernd Paysan <bernd.paysan@gmx.de> - 2015-09-09 20:59 +0200
Re: `don't` instead of `?do` hughaguilar96@gmail.com - 2015-09-10 21:26 -0700
csiph-web