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


Groups > comp.lang.forth > #55144

Re: eForth specific words?

From David Schultz <abuse@127.0.0.1>
Subject Re: eForth specific words?
Newsgroups comp.lang.forth
References <b1fac408-b9bf-4aac-a52b-d6d5d6f213c4@googlegroups.com>
Date 2017-02-26 20:15 -0600
Message-ID <ld6dnQ7ePbVFFi7FnZ2dnUU7-ePNnZ2d@earthlink.com> (permalink)

Show all headers | View raw


On 02/26/2017 04:20 PM, Michael Barry wrote:
> Hi all.  I ran into the non-standard words FOR AFT NEXT while playing around
>  with eForth.  I understand that FOR and NEXT are frowned upon by experienced
>  "old-schoolers" in a manner not unlike PICK and ROLL, but they're easy enough
>  to implement and understand.  The problem I'm having is understanding how
>  AFT works and using it inside (or even outside) a FOR ... NEXT loop.  AFT
>  appears to always be paired with a THEN but that's about all I have been able
>  to learn with any certainty.  I have noticed in the examples I've found that
>  there aren't any words between FOR and AFT nor any words between AFT's THEN
>  and NEXT ... is this state of affairs mandatory or optional, and if optional
>  how would those intervening words act, generally speaking?
> 
> TIA
> 
> Mike B.
> 

I am no expert but have been working on an eForth implementation for the
Teensy 3.6 recently.

Looking at the source it appears:

The code between FOR and AFT gets executed once.
The code between AFT and THEN is skipped on the first loop iteration but
is executed on each following iteration.
The code between THEN and NEXT gets executed on every loop iteration.

It seems like a lot of trouble but the eForth Overview document shows
several words that use it.


-- 
David W. Schultz
http://home.earthlink.net/~david.schultz
"Life without stock is barely worth living..." - Anthony Bourdain

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


Thread

eForth specific words? Michael Barry <barrym95838@yahoo.com> - 2017-02-26 14:20 -0800
  Re: eForth specific words? hughaguilar96@gmail.com - 2017-02-26 17:57 -0800
    Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-02-26 23:15 -0600
    Re: eForth specific words? Michael Barry <barrym95838@yahoo.com> - 2017-02-26 22:04 -0800
      Re: eForth specific words? JUERGEN <epldfpga@aol.com> - 2017-02-27 02:49 -0800
        Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-02-27 11:15 -0600
          Re: eForth specific words? JUERGEN <epldfpga@aol.com> - 2017-02-27 13:10 -0800
            Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-02-27 16:51 -0600
            Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-02-28 22:47 -0600
              Re: eForth specific words? Paul Rubin <no.email@nospam.invalid> - 2017-02-28 21:15 -0800
                Re: eForth specific words? rickman <gnuarm@gmail.com> - 2017-03-01 01:08 -0500
                Re: eForth specific words? Paul Rubin <no.email@nospam.invalid> - 2017-02-28 23:21 -0800
                Re: eForth specific words? JUERGEN <epldfpga@aol.com> - 2017-03-01 03:22 -0800
                Re: eForth specific words? Paul Rubin <no.email@nospam.invalid> - 2017-03-01 13:45 -0800
                Re: eForth specific words? Paul Rubin <no.email@nospam.invalid> - 2017-03-01 15:42 -0800
                Re: eForth specific words? Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-03-11 14:33 +0000
                Re: eForth specific words? JUERGEN <epldfpga@aol.com> - 2017-03-11 11:06 -0800
                Re: eForth specific words? Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-03-12 09:58 +0000
                Re: eForth specific words? JUERGEN <epldfpga@aol.com> - 2017-03-12 03:42 -0700
                Re: eForth specific words? "HAA" <someone@microsoft.com> - 2017-03-02 15:37 +1100
                Re: eForth specific words? rickman <gnuarm@gmail.com> - 2017-03-02 00:40 -0500
                Re: eForth specific words? Paul Rubin <no.email@nospam.invalid> - 2017-03-01 21:57 -0800
              Re: eForth specific words? JUERGEN <epldfpga@aol.com> - 2017-03-01 03:13 -0800
                Re: eForth specific words? Mark Wills <markwills1970@gmail.com> - 2017-03-01 03:29 -0800
                Re: eForth specific words? JUERGEN <epldfpga@aol.com> - 2017-03-01 10:49 -0800
                Re: eForth specific words? rickman <gnuarm@gmail.com> - 2017-03-01 14:13 -0500
                Re: eForth specific words? Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-03-11 12:39 +0000
                Re: eForth specific words? pbro <peter040@sympatico.ca> - 2017-03-11 13:09 -0800
                Re: eForth specific words? Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-03-12 10:22 +0000
                Re: eForth specific words? JUERGEN <epldfpga@aol.com> - 2017-03-12 03:57 -0700
                Re: eForth specific words? Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-03-12 15:03 +0000
                Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-03-01 09:42 -0600
                Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-03-01 10:27 -0600
                Re: eForth specific words? JUERGEN <epldfpga@aol.com> - 2017-03-01 11:12 -0800
                Re: eForth specific words? rickman <gnuarm@gmail.com> - 2017-03-01 14:19 -0500
                Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-03-01 14:34 -0600
                Re: eForth specific words? rickman <gnuarm@gmail.com> - 2017-03-01 14:16 -0500
                Re: eForth specific words? rickman <gnuarm@gmail.com> - 2017-03-01 14:08 -0500
                Re: eForth specific words? JUERGEN <epldfpga@aol.com> - 2017-03-01 11:22 -0800
                Re: eForth specific words? Paul Rubin <no.email@nospam.invalid> - 2017-03-01 11:29 -0800
                Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-03-01 14:54 -0600
                Re: eForth specific words? rickman <gnuarm@gmail.com> - 2017-03-01 18:00 -0500
              Re: eForth specific words? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-03-01 13:33 +0100
                Re: eForth specific words? Mark Wills <markwills1970@gmail.com> - 2017-03-01 06:19 -0800
                Re: eForth specific words? rickman <gnuarm@gmail.com> - 2017-03-01 14:17 -0500
                Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-03-01 09:54 -0600
        Re: eForth specific words? rickman <gnuarm@gmail.com> - 2017-02-27 14:21 -0500
      Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-02-27 11:08 -0600
        Re: eForth specific words? Michael Barry <barrym95838@yahoo.com> - 2017-02-27 09:17 -0800
          Re: eForth specific words? Michael Barry <barrym95838@yahoo.com> - 2017-02-27 09:38 -0800
          Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-02-27 12:34 -0600
            Re: eForth specific words? rickman <gnuarm@gmail.com> - 2017-02-27 14:23 -0500
              Re: eForth specific words? Michael Barry <barrym95838@yahoo.com> - 2017-02-27 11:49 -0800
                Re: eForth specific words? rickman <gnuarm@gmail.com> - 2017-02-27 15:14 -0500
                Re: eForth specific words? Michael Barry <barrym95838@yahoo.com> - 2017-02-27 12:39 -0800
                Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-02-27 15:04 -0600
                Re: eForth specific words? Michael Barry <barrym95838@yahoo.com> - 2017-02-27 14:31 -0800
                Re: eForth specific words? rickman <gnuarm@gmail.com> - 2017-02-27 17:44 -0500
        Re: eForth specific words? Paul Rubin <no.email@nospam.invalid> - 2017-02-27 23:11 -0800
          Re: eForth specific words? JUERGEN <epldfpga@aol.com> - 2017-02-27 23:22 -0800
            Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-02-28 01:26 -0600
              Re: eForth specific words? JUERGEN <epldfpga@aol.com> - 2017-02-28 00:58 -0800
                Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-02-28 10:24 -0600
          Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-02-28 01:25 -0600
            Re: eForth specific words? Paul Rubin <no.email@nospam.invalid> - 2017-02-28 03:44 -0800
              Re: eForth specific words? JUERGEN <epldfpga@aol.com> - 2017-02-28 09:56 -0800
                Re: eForth specific words? Paul Rubin <no.email@nospam.invalid> - 2017-02-28 14:16 -0800
                Re: eForth specific words? rickman <gnuarm@gmail.com> - 2017-02-28 20:03 -0500
              Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-02-28 12:12 -0600
                Re: eForth specific words? Paul Rubin <no.email@nospam.invalid> - 2017-02-28 14:19 -0800
                Re: eForth specific words? Cecil Bayona <cbayona@cbayona.com> - 2017-02-28 16:49 -0600
                Re: eForth specific words? Paul Rubin <no.email@nospam.invalid> - 2017-02-28 15:07 -0800
      Re: eForth specific words? rickman <gnuarm@gmail.com> - 2017-02-27 14:19 -0500
  Re: eForth specific words? David Schultz <abuse@127.0.0.1> - 2017-02-26 20:15 -0600
    Re: eForth specific words? Michael Barry <barrym95838@yahoo.com> - 2017-02-26 20:15 -0800
  Re: eForth specific words? Julian Fondren <julian.fondren@gmail.com> - 2017-02-26 18:20 -0800
    Re: eForth specific words? David Schultz <abuse@127.0.0.1> - 2017-02-26 20:33 -0600
      Re: eForth specific words? rickman <gnuarm@gmail.com> - 2017-02-26 22:18 -0500
  Re: eForth specific words? JUERGEN <epldfpga@aol.com> - 2017-02-27 03:19 -0800
    Re: eForth specific words? Michael Barry <barrym95838@yahoo.com> - 2017-02-27 08:08 -0800
  Re: eForth specific words? "HAA" <someone@microsoft.com> - 2017-02-28 19:30 +1100
  Re: eForth specific words? jacko <jackokring@gmail.com> - 2017-03-01 11:43 -0800
    Re: eForth specific words? jacko <jackokring@gmail.com> - 2017-03-01 12:16 -0800

csiph-web