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


Groups > comp.lang.forth > #24828

Re: How to abort loops and other return stack fiddling words?

Newsgroups comp.lang.forth
Date 2013-07-28 03:20 -0700
References (3 earlier) <76d79e90-f181-4c1d-afa0-3863760f22a9@googlegroups.com> <2013Jul22.180100@mips.complang.tuwien.ac.at> <ksjmeb$1vj$1@dont-email.me> <BKGdnWp-A4QhG3LMnZ2dnUVZ_hednZ2d@supernews.com> <kt1uj5$id$1@dont-email.me>
Message-ID <a55cc06e-489d-4cb9-bd76-a140ba144ab9@googlegroups.com> (permalink)
Subject Re: How to abort loops and other return stack fiddling words?
From Mark Wills <markrobertwills@yahoo.co.uk>

Show all headers | View raw


On Sunday, July 28, 2013 3:15:49 AM UTC+1, rickman wrote:
> On 7/24/2013 3:48 AM, Andrew Haley wrote:
> 
> > rickman<gnuarm@gmail.com>  wrote:
> 
> >> On 7/22/2013 12:01 PM, Anton Ertl wrote:
> 
> >>> Mark Wills<markrobertwills@yahoo.co.uk>   writes:
> 
> >>>> All of which voids the entire point - that an AGAIN loop is
> 
> >>>> *supposed* to be infinate. So if you *do* need to exit the loop,
> 
> >>>> you shouldn't be using it.
> 
> >>>
> 
> >>> Maybe that's your house style, but not everybody has to follow your
> 
> >>> house style.  In standard Forth AGAIN is just an unconditional branch
> 
> >>> backwards.  You can use it for building infinite loops, but also for
> 
> >>> other purposes.
> 
> >>
> 
> >> Do you have examples of loops with exits that are better served by AGAIN
> 
> >> than they are with UNITL or WHILE?  Are you talking about error
> 
> >> handling?   I can't think of any example where I thought it better to
> 
> >> make an infinite loop with an error exit than just using a loop with an
> 
> >> exit condition like UNTIL or WHILE.
> 
> >
> 
> > The classic case is
> 
> >
> 
> > begin
> 
> >    something
> 
> >    something_else if  maybe if  yes_action  exit  then  step  then
> 
> >    more
> 
> > again
> 
> >
> 
> > It's possible to restructure this, but not easy.
> 
> 
> 
> Wow! I can't even understand what this is saying.  What are "maybe" and 
> 
> "step"?  I guess I don't get any sense of why this code is written this 
> 
> way.
> 
> 
> 
> begin
> 
>     something
> 
>     something_else maybe OVER AND 0= while if  step  then
> 
>     more
> 
> repeat
> 
> yes_action  ;
> 
> 
> 
> Is that so complex?  Did I miss something?  Have you ever needed to use 
> 
> something like this?
> 
> 
> 
> -- 
> 
> 
> 
> Rick

Rickman,

Often these types of threads devolve from trying to help the OP with sensible advice into a Forth cock-measuring contest.

It's just not worth it.

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


Thread

How to abort loops and other return stack fiddling words… Christian Kellermann <ckeen@pestilenz.org> - 2013-07-22 11:54 +0200
  Re: How to abort loops and other return stack fiddling words… Mark Wills <markrobertwills@yahoo.co.uk> - 2013-07-22 04:18 -0700
    Re: How to abort loops and other return stack fiddling words… Christian Kellermann <ckeen@pestilenz.org> - 2013-07-22 14:31 +0200
      Re: How to abort loops and other return stack fiddling words… daveyrotten <danw8804@gmail.com> - 2013-07-22 08:31 -0700
    Re: How to abort loops and other return stack fiddling words… Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-07-22 13:56 +0100
      Re: How to abort loops and other return stack fiddling words… Mark Wills <markrobertwills@yahoo.co.uk> - 2013-07-22 06:46 -0700
        Re: Re: How to abort loops and other return stack fiddling words… anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-07-22 16:01 +0000
          Re: How to abort loops and other return stack fiddling words… rickman <gnuarm@gmail.com> - 2013-07-22 12:31 -0400
            Re: Re: How to abort loops and other return stack fiddling words… anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-07-22 16:36 +0000
            Re: How to abort loops and other return stack fiddling words… "Ed" <invalid@invalid.com> - 2013-07-24 12:18 +1000
            Re: How to abort loops and other return stack fiddling words? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-24 02:48 -0500
              Re: How to abort loops and other return stack fiddling words? rickman <gnuarm@gmail.com> - 2013-07-27 22:15 -0400
                Re: How to abort loops and other return stack fiddling words? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-28 03:37 -0500
                Re: How to abort loops and other return stack fiddling words? rickman <gnuarm@gmail.com> - 2013-07-29 11:01 -0400
                Re: How to abort loops and other return stack fiddling words? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-29 11:07 -0500
                Re: How to abort loops and other return stack fiddling words? rickman <gnuarm@gmail.com> - 2013-07-29 12:32 -0400
                Re: How to abort loops and other return stack fiddling words? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-29 11:54 -0500
                Re: How to abort loops and other return stack fiddling words? rickman <gnuarm@gmail.com> - 2013-07-29 13:19 -0400
                Re: How to abort loops and other return stack fiddling words? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-29 15:27 -0500
                Re: How to abort loops and other return stack fiddling words? Mark Wills <markrobertwills@yahoo.co.uk> - 2013-07-28 03:20 -0700
                Re: How to abort loops and other return stack fiddling words? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-28 08:17 -0500
        Re: How to abort loops and other return stack fiddling words… Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-07-22 18:07 +0100
      Re: Re: How to abort loops and other return stack fiddling words… albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-07-22 14:12 +0000
        Re: How to abort loops and other return stack fiddling words… Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-07-22 17:49 +0100
      Re: How to abort loops and other return stack fiddling words… hughaguilar96@yahoo.com - 2013-07-22 20:25 -0700
  Re: How to abort loops and other return stack fiddling words? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-22 07:54 -0500

csiph-web