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


Groups > comp.lang.forth > #41834

`don't` instead of `?do`

Path csiph.com!news.mixmin.net!aioe.org!.POSTED!not-for-mail
From Marcos Cruz <null_email_so_use_my_contact_page@programandala.net>
Newsgroups comp.lang.forth
Subject `don't` instead of `?do`
Date Mon, 7 Sep 2015 20:20:41 +0000 (UTC)
Organization Aioe.org NNTP Server
Lines 15
Message-ID <mskrip$5ff$1@speranza.aioe.org> (permalink)
NNTP-Posting-Host 0vdwzaxayNBNtQse0FemWQ.user.speranza.aioe.org
X-Complaints-To abuse@aioe.org
User-Agent slrn/pre1.0.0-18 (Linux)
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com comp.lang.forth:41834

Show key headers only | View raw


I still haven't implemented in a Forth of mine, but meanwhile I had this
simple idea as an alternative, for do-loop structures that are factored
in its own definition:

	: don't  ( n1 n2 -- | n1 n2 )
	  2dup = if  2drop unnest unnest then  ;

	: list  ( n1 n2 -- )
	  don't do  i .  loop  ;

I like the name `don't`, but I accept suggestions.

-- 
Marcos Cruz
http://programandala.net

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


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