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


Groups > comp.lang.forth > #42567

Re: CATCH and THROW

From Paul Rubin <no.email@nospam.invalid>
Newsgroups comp.lang.forth
Subject Re: CATCH and THROW
Date 2015-10-10 23:51 -0700
Organization A noiseless patient Spider
Message-ID <87twpx3nkg.fsf@jester.gateway.sonic.net> (permalink)
References <f4a03b80-5545-4e8f-aefb-62f090baf516@googlegroups.com> <op.x59sxir7yfako5@localhost> <mvcde8$7la$1@speranza.aioe.org> <3af8e118-f284-449f-8da0-883fc125790c@googlegroups.com> <mvcvm1$jh9$1@dont-email.me>

Show all headers | View raw


rickman <gnuarm@gmail.com> writes:
> If a response timed out or was received invalid, the CATCH/THROW
> mechanism allowed the code to more easily find its way back to either
> retrying the operation or exitingn....  Trying to code this in more
> conventional flow control resulted in a mess of flag checking

You could also do this with a multitasker.  In the error case, the
serial port task would send a message to the control task, then jump
back to the top of its own event loop.  This is usually cleaner when
there are asynchronous events and timeouts in a system.

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


Thread

CATCH and THROW Mark Wills <markwills1970@gmail.com> - 2015-10-09 05:46 -0700
  Re: CATCH and THROW anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-09 16:05 +0000
    Re: CATCH and THROW "Elizabeth D. Rather" <erather@forth.com> - 2015-10-09 08:30 -1000
      Re: CATCH and THROW JennyB <jennybrien@googlemail.com> - 2015-10-09 12:19 -0700
        Re: CATCH and THROW Mark Wills <markwills1970@gmail.com> - 2015-10-09 12:30 -0700
  Re: CATCH and THROW "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-09 23:21 -0400
    Re: CATCH and THROW Paul Rubin <no.email@nospam.invalid> - 2015-10-09 20:37 -0700
    Re: CATCH and THROW Mark Wills <markwills1970@gmail.com> - 2015-10-10 01:16 -0700
      Re: CATCH and THROW Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-10-10 19:18 +0100
    Re: CATCH and THROW "HAA" <someone@microsoft.com> - 2015-10-11 12:18 +1000
      Re: CATCH and THROW hughaguilar96@gmail.com - 2015-10-10 23:21 -0700
        Re: CATCH and THROW rickman <gnuarm@gmail.com> - 2015-10-11 02:32 -0400
          Re: CATCH and THROW Paul Rubin <no.email@nospam.invalid> - 2015-10-10 23:51 -0700
            Re: CATCH and THROW rickman <gnuarm@gmail.com> - 2015-10-11 04:16 -0400
              Re: CATCH and THROW Paul Rubin <no.email@nospam.invalid> - 2015-10-11 23:27 -0700
                Re: CATCH and THROW rickman <gnuarm@gmail.com> - 2015-10-12 02:39 -0400
                Re: CATCH and THROW "Elizabeth D. Rather" <erather@forth.com> - 2015-10-11 21:26 -1000
              Re: CATCH and THROW "Elizabeth D. Rather" <erather@forth.com> - 2015-10-11 21:22 -1000
        Re: CATCH and THROW "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-12 01:29 -0400
          Re: CATCH and THROW rickman <gnuarm@gmail.com> - 2015-10-12 02:23 -0400
            Re: CATCH and THROW "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-12 19:52 -0400
              Re: CATCH and THROW rickman <gnuarm@gmail.com> - 2015-10-12 21:14 -0400
      Re: CATCH and THROW "Elizabeth D. Rather" <erather@forth.com> - 2015-10-10 21:19 -1000

csiph-web