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


Groups > comp.lang.forth > #36444

Re: What is the word to break a do while loop?

From "HAA" <someone@microsoft.com>
Newsgroups comp.lang.forth
Subject Re: What is the word to break a do while loop?
Date 2015-02-11 10:30 +1100
Organization Aioe.org NNTP Server
Message-ID <mbe48a$ve0$1@speranza.aioe.org> (permalink)
References <53c95926-d610-4995-8746-5a9166ea3b75@googlegroups.com><c0f56ca0-7d8d-4099-a026-22fd12265397@googlegroups.com><dc873b28-4c51-49cb-ba0a-f169c167570e@googlegroups.com><mb6vor$2tp$1@speranza.aioe.org><281b571d-a1c6-429a-ba9e-8096e220ac38@googlegroups.com> <mb9heu$jbn$1@speranza.aioe.org> <712920a4-4782-41b3-8657-dbcc9dd20142@googlegroups.com>

Show all headers | View raw


hughaguilar96@gmail.com wrote:
> On Sunday, February 8, 2015 at 10:44:03 PM UTC-7, HAA wrote:
> > hughaguilar96@gmail.com wrote:
> > > On Saturday, February 7, 2015 at 11:29:51 PM UTC-7, HAA wrote:
> > [...]
> > If there was a faster or more space efficient way than multiple WHILE I would use it.
> > Not sure what you mean by BRANCH.  There's one in ELSE but its use with multiple
> > WHILE is optional and rarely needed in my experience.
>
> I meant 0BRANCH --- in the WHILE.
>
> Actually, now that I think about it, WHILE has one 0BRANCH, but IF EXIT THEN has a
> 0BRANCH (the IF) plus an EXIT --- so my technique is slightly slower. On the MiniForth,
> calling a colon word was very fast, but this isn't necessarily true on other Forths ---
> so, putting the loop in its own colon word can make my technique yet slower.
>
> As a practical matter, we are talking about a few microseconds difference here, so it
> doesn't really matter very much.
>
> I think my technique results in much more readable code than the ANS-Forth
> multiple-WHILE technique due to ANS-Forth requiring THEN after the REPEAT which is
> pretty baffling --- ANS-Forth is gratuitously complicated and generally baffling ---
> ANS-Forth is just a problem that has to be worked around.

UNTIL/REPEAT ... THEN is apt indicating the multiple exit points which
users may exploit.  Use in Forth predates ANS (Thinking Forth, cmFORTH).




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


Thread

What is the word to break a do while loop? Faisal <faisalm83@gmail.com> - 2015-02-03 23:24 -0800
  Re: What is the word to break a do while loop? Mark Wills <markwills1970@gmail.com> - 2015-02-04 01:53 -0800
  Re: What is the word to break a do while loop? Mark Wills <markwills1970@gmail.com> - 2015-02-04 02:15 -0800
  Re: What is the word to break a do while loop? Coos Haak <chforth@hccnet.nl> - 2015-02-04 12:54 +0100
    Re: What is the word to break a do while loop? "Rod Pemberton" <buzz@notnotnontnooatno.cmm> - 2015-02-04 18:50 -0500
    Re: What is the word to break a do while loop? hughaguilar96@gmail.com - 2015-02-04 18:29 -0800
      Re: What is the word to break a do while loop? hughaguilar96@gmail.com - 2015-02-04 18:43 -0800
  Re: What is the word to break a do while loop? JennyB <jennybrien@googlemail.com> - 2015-02-04 05:53 -0800
    Re: What is the word to break a do while loop? hughaguilar96@gmail.com - 2015-02-04 18:36 -0800
      Re: What is the word to break a do while loop? "HAA" <someone@microsoft.com> - 2015-02-08 17:31 +1100
        Re: What is the word to break a do while loop? hughaguilar96@gmail.com - 2015-02-08 09:13 -0800
          Re: What is the word to break a do while loop? "HAA" <someone@microsoft.com> - 2015-02-09 16:45 +1100
            Re: What is the word to break a do while loop? hughaguilar96@gmail.com - 2015-02-09 22:36 -0800
              Re: What is the word to break a do while loop? "HAA" <someone@microsoft.com> - 2015-02-11 10:30 +1100
  Re: What is the word to break a do while loop? lehs <skydda.barnen@gmail.com> - 2015-02-05 08:54 -0800

csiph-web