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


Groups > comp.lang.forth > #16855 > unrolled thread

Is there a better way?

Started byMark Wills <forthfreak@gmail.com>
First post2012-10-31 04:58 -0700
Last post2012-11-02 13:13 -0400
Articles 20 on this page of 169 — 25 participants

Back to article view | Back to comp.lang.forth


Contents

  Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 04:58 -0700
    Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-10-31 05:22 -0700
      Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 05:44 -0700
        Re: Is there a better way? "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-10-31 11:29 -0400
          Re: Is there a better way? "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-10-31 11:40 -0400
            Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 08:45 -0700
              Re: Is there a better way? "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-02 04:48 -0400
            Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-10-31 21:42 -0400
              Re: Is there a better way? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-01 19:19 -0700
                Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-02 13:06 -0400
                  Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-02 12:18 -0500
                    Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-02 14:34 -0400
                      Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-11-02 11:39 -0700
                        Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-02 14:43 -0400
                          Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-04 02:36 -0600
                            Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-04 14:18 -0500
                      Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-02 14:38 -0700
                        Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-04 03:01 -0600
                          Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-04 03:54 -0800
                            Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-04 07:59 -0600
                            Re: Is there a better way? Elizabeth D Rather <erather@forth.com> - 2012-11-04 08:34 -1000
                              Re: Is there a better way? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-04 15:22 -0800
                                Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-05 02:39 -0800
                                  Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-05 14:01 -0500
                                    Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-05 10:39 -1000
                                      Re: Words consuming arguments, was [Re: Is there a better way?] Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-05 21:07 -0800
                                        Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-06 20:57 -0500
                                          Re: Words consuming arguments, was [Re: Is there a better way?] Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-06 21:43 -0800
                                            Re: Words consuming arguments, was [Re: Is there a better way?] Mark Wills <forthfreak@gmail.com> - 2012-11-07 03:52 -0800
                                            Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-07 19:55 -0500
                                              Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-07 20:46 -1000
                                                Re: Words consuming arguments, was [Re: Is there a better way?] stephenXXX@mpeforth.com (Stephen Pelc) - 2012-11-08 10:39 +0000
                                              Re: Words consuming arguments, was [Re: Is there a better way?] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-12 03:48 -0600
                                                Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-12 07:57 -1000
                                                  Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-12 19:50 -0500
                                                Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-12 19:49 -0500
                                                  Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-12 15:00 -1000
                                                    Re: Words consuming arguments, was [Re: Is there a better way?] Mark Wills <forthfreak@gmail.com> - 2012-11-13 00:50 -0800
                                                      Re: Words consuming arguments, was [Re: Is there a better way?] Mark Wills <forthfreak@gmail.com> - 2012-11-13 00:58 -0800
                                                        Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-12 23:17 -1000
                                                      Re: Words consuming arguments, was [Re: Is there a better way?] albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-11-13 13:44 +0000
                                                      Re: Words consuming arguments, was [Re: Is there a better way?] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-13 13:53 +0000
                                                        Re: Words consuming arguments, was [Re: Is there a better way?] Alex McDonald <blog@rivadpm.com> - 2012-11-13 06:39 -0800
                                                          Re: Words consuming arguments, was [Re: Is there a better way?] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-13 18:02 +0000
                                                            Re: Words consuming arguments, was [Re: Is there a better way?] Alex McDonald <blog@rivadpm.com> - 2012-11-13 12:10 -0800
                                                              Re: Words consuming arguments, was [Re: Is there a better way?] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-15 16:59 +0000
                                                        Re: Words consuming arguments, was [Re: Is there a better way?] Mark Wills <forthfreak@gmail.com> - 2012-11-13 07:55 -0800
                                                          Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-14 06:34 -0500
                                                            Re: Words consuming arguments, was [Re: Is there a better way?] Mark Wills <forthfreak@gmail.com> - 2012-11-14 05:01 -0800
                                                              Re: Words consuming arguments, was [Re: Is there a better way?] albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-11-14 16:11 +0000
                                                              Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-14 09:36 -1000
                                                                Re: Words consuming arguments, was [Re: Is there a better way?] humptydumpty <ouatubi@gmail.com> - 2012-11-14 12:19 -0800
                                                      Re: Words consuming arguments, was [Re: Is there a better way?] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-13 10:20 -0600
                                                      Re: Words consuming arguments, was [Re: Is there a better way?] Brad Eckert <hwfwguy@gmail.com> - 2012-11-13 08:50 -0800
                                                      Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-14 06:42 -0500
                                                        Re: Words consuming arguments, was [Re: Is there a better way?] stephenXXX@mpeforth.com (Stephen Pelc) - 2012-11-14 14:14 +0000
                                                          Re: Words consuming arguments, was [Re: Is there a better way?] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-14 15:28 +0000
                                                            Re: Words consuming arguments, was [Re: Is there a better way?] Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-14 17:54 +0100
                                                          Re: Words consuming arguments, was [Re: Is there a better way?] Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-14 15:01 -0800
                                                            Re: Words consuming arguments, was [Re: Is there a better way?] Mark Wills <forthfreak@gmail.com> - 2012-11-15 00:08 -0800
                                                              Strings (was: Words consuming arguments) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-15 15:18 +0000
                                                                Re: Strings (was: Words consuming arguments) albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-11-15 16:36 +0000
                                                                Re: Strings (was: Words consuming arguments) "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-15 18:35 -0500
                                                                  Re: Strings (was: Words consuming arguments) stephenXXX@mpeforth.com (Stephen Pelc) - 2012-11-16 00:36 +0000
                                                                    Re: Strings (was: Words consuming arguments) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-16 17:42 +0000
                                                                  Re: Strings (was: Words consuming arguments) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-16 17:55 +0000
                                                              Re: Words consuming arguments, was [Re: Is there a better way?] Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-17 04:18 -0800
                                                                Re: Words consuming arguments, was [Re: Is there a better way?] Alex McDonald <blog@rivadpm.com> - 2012-11-17 04:56 -0800
                                                                  Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-17 07:24 -1000
                                                                    Re: Words consuming arguments, was [Re: Is there a better way?] Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-19 15:58 -0800
                                                                      Re: Words consuming arguments, was [Re: Is there a better way?] Brad Eckert <hwfwguy@gmail.com> - 2012-11-20 08:17 -0800
                                                    Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-14 06:30 -0500
                                                      Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-14 09:06 -1000
                                                        Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-15 06:18 -0500
                                                  Re: Words consuming arguments, was [Re: Is there a better way?] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-13 04:26 -0600
                                                    Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-14 06:29 -0500
                                                      Re: Words consuming arguments, was [Re: Is there a better way?] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-14 06:03 -0600
                                                        Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-15 07:15 -0500
                                                          Re: Words consuming arguments, was [Re: Is there a better way?] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-15 11:51 -0600
                                                            Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-15 18:44 -0500
                                                              Re: Words consuming arguments, was [Re: Is there a better way?] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-16 03:50 -0600
                                                          Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-15 08:09 -1000
                                          Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-06 21:19 -1000
                                            Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-07 20:00 -0500
                                              Re: Words consuming arguments, was [Re: Is there a better way?] stephenXXX@mpeforth.com (Stephen Pelc) - 2012-11-08 10:49 +0000
                                          Re: Words consuming arguments, was [Re: Is there a better way?] albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-11-07 14:01 +0000
                        Re: Is there a better way? awegel@arcor.de (Alex Wegel) - 2012-11-04 11:07 +0100
                          Re: Is there a better way? awegel@arcor.de (Alex Wegel) - 2012-11-04 11:36 +0100
                            Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-04 03:48 -0800
                              Re: Is there a better way? awegel@arcor.de (Alex Wegel) - 2012-11-04 13:31 +0100
                              Re: Is there a better way? Coos Haak <chforth@hccnet.nl> - 2012-11-04 13:29 +0100
                                Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-04 04:42 -0800
                      Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-04 02:38 -0600
      Re: Is there a better way? Doug Hoffman <glidedog@gmail.com> - 2012-10-31 10:20 -0400
    Re: Is there a better way? humptydumpty <ouatubi@gmail.com> - 2012-10-31 05:53 -0700
    Re: Is there a better way? Doug Hoffman <glidedog@gmail.com> - 2012-10-31 09:23 -0400
      Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 06:41 -0700
        Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-10-31 11:46 -0500
          Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 14:27 -0700
            Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-10-31 14:32 -0700
              Re: Is there a better way? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-10-31 16:15 -0700
            Re: Is there a better way? Coos Haak <chforth@hccnet.nl> - 2012-10-31 22:49 +0100
            Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-10-31 17:13 -0500
              Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 23:39 -0700
                Re: Is there a better way? "Elizabeth D. Rather" <erather@forth.com> - 2012-10-31 20:58 -1000
                Re: Is there a better way? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-01 02:04 -0700
            Re: Is there a better way? "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-10-31 19:13 -0400
            Re: Is there a better way? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-02 17:31 +0000
              Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-11-02 10:37 -0700
                Re: Is there a better way? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-02 18:12 +0000
                  Re: Is there a better way? "Elizabeth D. Rather" <erather@forth.com> - 2012-11-02 08:29 -1000
                    Re: Is there a better way? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-05 14:53 +0000
                  Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-11-02 11:30 -0700
                    Re: Is there a better way? Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-03 00:15 +0100
                      Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-02 19:21 -0400
                        Re: Is there a better way? Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-03 00:42 +0100
                          Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-02 20:21 -0400
                            Re: Is there a better way? Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-03 01:44 +0100
                              Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-03 12:12 -0400
                                Re: Is there a better way? Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-03 18:24 +0100
                                  Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-03 14:00 -0400
                                Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-11-03 10:29 -0700
                      Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-11-02 18:42 -0700
                    Re: Is there a better way? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-05 11:45 +0000
          Re: Is there a better way? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-11-01 21:00 +0000
    Re: Is there a better way? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-10-31 15:26 +0000
      Re: Is there a better way? Doug Hoffman <glidedog@gmail.com> - 2012-10-31 12:22 -0400
        Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 15:07 -0700
          Re: Is there a better way? Doug Hoffman <glidedog@gmail.com> - 2012-10-31 19:16 -0400
            Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-01 06:31 -0700
              Re: Is there a better way? Doug Hoffman <glidedog@gmail.com> - 2012-11-01 10:34 -0400
                Re: Is there a better way? Doug Hoffman <glidedog@gmail.com> - 2012-11-01 10:48 -0400
                  Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-01 08:55 -0700
                Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-01 08:49 -0700
                  Re: Is there a better way? Doug Hoffman <glidedog@gmail.com> - 2012-11-01 12:46 -0400
              Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-01 09:37 -0500
              Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-11-01 07:41 -0700
                Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-01 08:52 -0700
                  Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-01 12:18 -0500
                    Re: Is there a better way? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-01 19:38 -0700
                      Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-02 02:29 -0700
                        Re: Is there a better way? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-04 21:48 -0800
                          Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-05 02:44 -0800
              Re: Is there a better way? Graham NEWS <gray@forthman.plus.com> - 2012-11-01 15:52 +0000
            Re: Is there a better way? Josh Grams <josh@qualdan.com> - 2012-11-03 16:38 +0000
      Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 14:26 -0700
        Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-01 13:42 -0400
    Re: Is there a better way? Graham <""gray\"@forthman@plus.com"> - 2012-10-31 17:05 +0000
      Re: Is there a better way? Peter Fälth <peter.falth@tin.it> - 2012-10-31 12:07 -0700
        Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-10-31 12:12 -0700
          Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 14:17 -0700
      Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 14:21 -0700
        Re: Is there a better way? Pablo Hugo Reda <pabloreda@gmail.com> - 2012-10-31 14:50 -0700
          Re: Is there a better way? Pablo Hugo Reda <pabloreda@gmail.com> - 2012-10-31 14:51 -0700
            Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-10-31 14:57 -0700
              Re: Is there a better way? Coos Haak <chforth@hccnet.nl> - 2012-10-31 23:47 +0100
                Re: Is there a better way? mhx@iae.nl (Marcel Hendrix) - 2012-11-01 21:28 +0200
          Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 15:11 -0700
            Re: Is there a better way? Pablo Hugo Reda <pabloreda@gmail.com> - 2012-10-31 15:44 -0700
              Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-01 13:55 -0400
    Re: Is there a better way? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-10-31 16:10 -0700
    Re: Is there a better way? Charles Mélice <charles.melice@gmail.com> - 2012-11-02 01:10 -0700
      Re: Is there a better way? Charles Mélice <charles.melice@gmail.com> - 2012-11-02 01:18 -0700
      Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-02 01:58 -0700
        Re: Is there a better way? Charles Mélice <charles.melice@gmail.com> - 2012-11-02 02:14 -0700
          Re: Is there a better way? Charles Mélice <charles.melice@gmail.com> - 2012-11-02 02:16 -0700
            Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-02 06:16 -0500
              Re: Is there a better way? Charles Mélice <charles.melice@gmail.com> - 2012-11-02 06:04 -0700
      Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-02 13:13 -0400

Page 8 of 9 — ← Prev page 1 2 3 4 5 6 7 [8] 9  Next page →


#16972

FromMark Wills <forthfreak@gmail.com>
Date2012-11-02 02:29 -0700
Message-ID<b113a235-5126-4710-97a9-c204f57cea8b@k20g2000vbj.googlegroups.com>
In reply to#16963
On Nov 2, 2:38 am, Hugh Aguilar <hughaguila...@yahoo.com> wrote:
>
> That was some really ugly Forth! For something like that, locals will
> help a lot. In my novice package I have +TO that is useful for
> stepping the pointers. You can also do without locals (I did for many
> many years), but in this case factoring is going to help a lot (the
> use of locals and the use of factoring are mutually exclusive, as
> functions with locals can't really be factored).
>

He he! Yeah, it was a pretty good example of write-only wasn't it?! I
knew it was ugly, that's why I posted it asking for feedback.

By the way, I REALLY like your macro: in the novice package. I might
try to implement that in my system too. I need to implement evaluate
first though.

> You should write something clean first, without concern for speed.
> There is no point in writing convulated code like you did. It takes
> too long to get that kind of code working, and the result is just
> ugly. After you have a clean version working, you can rewrite it as
> necessary to make it faster.
>
> You will notice in my novice package I often have two versions of a
> function, with the readable one being commented out. It is okay to
> leave a history of the evolution of your words in your source-code
> like this.
>
> Look at my word EXCHANGE in the novice package (it exchanges records
> in an array during sorting), which is somewhat similar.

[toc] | [prev] | [next] | [standalone]


#17052

FromHugh Aguilar <hughaguilar96@yahoo.com>
Date2012-11-04 21:48 -0800
Message-ID<cbfceb56-ab77-43db-b44c-3adb6e2f73e6@b4g2000pby.googlegroups.com>
In reply to#16972
On Nov 2, 2:29 am, Mark Wills <forthfr...@gmail.com> wrote:
> On Nov 2, 2:38 am, Hugh Aguilar <hughaguila...@yahoo.com> wrote:
>
>
>
> > That was some really ugly Forth! For something like that, locals will
> > help a lot. In my novice package I have +TO that is useful for
> > stepping the pointers. You can also do without locals (I did for many
> > many years), but in this case factoring is going to help a lot (the
> > use of locals and the use of factoring are mutually exclusive, as
> > functions with locals can't really be factored).
>
> He he! Yeah, it was a pretty good example of write-only wasn't it?! I
> knew it was ugly, that's why I posted it asking for feedback.

Well, I hope you can take it as constructive criticism --- I'm not
just a troll who says that everybody else's code sucks. There is a
tendency among novices to spend too much time crafting a solution to
some sticky problem like this, and to end up with write-only code.
Most of the time this is due to a misguided desire for optimization.
Don't get bogged down doing this --- focus on the big picture which is
writing programs, and don't worry too much about optimizing individual
functions.

> By the way, I REALLY like your macro: in the novice package. I might
> try to implement that in my system too. I need to implement evaluate
> first though.

There are a couple of ways to write MACRO:. I originally wrote it so
that it looked up every word and saved all of the xt values. I did
that in UR/Forth for MFX, and I later did that in ANS-Forth. This
didn't work out so well:
https://groups.google.com/group/comp.lang.forth/browse_thread/thread/c0fe67c350a5cec3
The problem was that ANS-Forth allows some words to not have xt values
at all(!). I think this is just the ANS-Forth standard being sabotaged
to allow Gforth's bugs to be legal. Anyway, that is how ANS-Forth is.
I had to rewrite MACRO: so that it would save the strings and do an
EVALUATE on them to generate the code, which is what I have now. (The
novice package is full of work-arounds like this for various problems
in the ANS-Forth standard and/or bugs in various Forth systems.)

You don't really need EVALUATE to write MACRO: in your system. You
could use my original method and save all the xt values. To generate
the code you EXECUTE the immediate ones and COMPILE, the rest. If you
do this, you have to special-case some of the words. Semi-colon has to
be special-cased so that your MACRO: knows when it is done. Words like
\ and S" and C" and ." that are immediate and which remove data from
the input stream also have to be special-cased.

The advantage of using EVALUATE is that there aren't so many special-
cases (only semi-colon). The disadvantage of EVALUATE is that you are
doing late-binding, which means that if the definitions get changed
since the time that a macro was written, the macro will do something
different than it originally did.

The advantage of using xts is that this is early-binding, so the macro
always does what makes sense at the time that it was written. The
disadvantage is that you have a lot of special-cases --- this is
especially a problem if you later write some words of your own that
are immediate and which take data out of the input stream, because you
will have to go back and upgrade MACRO: to special-case these as well
--- if you forget to do this, then your MACRO: will suddenly have a
bug although it had worked okay previously.

Another advantage of using EVALUATE is that a lot of your macros will
work interactively, as well as inside of colon words (just so long as
they don't use BEGIN, IF, >R, etc., that don't work interactively).

All in all, I think using EVALUATE is the better choice. When I was at
Testra however, I saved all the xts and that worked fine --- both
methods are reasonable.

BTW --- You should call it MACRO: rather than MACRO or anything else.
The reason is that a lot of times you will write colon words and then
change them into macros after they are debugged. Later on you can't
remember which words are colon words and which are macros. With your
text-editor search facility, you can look up a string ": xxx" with xxx
being the word's name. This will find the definition of xxx whether it
was defined with : or with MACRO: because in both cases the : is at
the rightmost of the defining word. See? I'm thinking ahead all of the
time! :-)

[toc] | [prev] | [next] | [standalone]


#17058

FromMark Wills <forthfreak@gmail.com>
Date2012-11-05 02:44 -0800
Message-ID<61bdb410-ae3c-4d68-b487-5967b4de930a@a6g2000vbl.googlegroups.com>
In reply to#17052
On Nov 5, 5:48 am, Hugh Aguilar <hughaguila...@yahoo.com> wrote:
>
> Well, I hope you can take it as constructive criticism --- I'm not
> just a troll who says that everybody else's code sucks. There is a
> tendency among novices to spend too much time crafting a solution to
> some sticky problem like this, and to end up with write-only code.
> Most of the time this is due to a misguided desire for optimization.
> Don't get bogged down doing this --- focus on the big picture which is
> writing programs, and don't worry too much about optimizing individual
> functions.
>

Absolutely. I do respect the opinions of the folk on here which is why
I posted the code! Sometimes one needs a thick skin around here but I
was aware of that before I posted the code. And anyway, the comments
weren't too harsh, and were well meaning, so all's good!

Seeing as I am the only Forth programmer that I've ever met, I have no
choice but to post here ;-)

If Jeff were still around I would have a private email in my inbox
giving me a friendly poking at my errant code and showing me how it
should be done. He too could write great Forth code, and he spend huge
amounts of time writing back and forth just talking Forth. I miss him.

[toc] | [prev] | [next] | [standalone]


#16942

FromGraham NEWS <gray@forthman.plus.com>
Date2012-11-01 15:52 +0000
Message-ID<fK6dnd9l_-tTBw_NnZ2dnUVZ8kqdnZ2d@bt.com>
In reply to#16933
On 01/11/2012 13:31, Mark Wills wrote:
> On Oct 31, 11:16 pm, Doug Hoffman <glide...@gmail.com> wrote:
>> On 10/31/12 6:07 PM, Mark Wills wrote:
>>
>>> On Oct 31, 4:22 pm, Doug Hoffman <glide...@gmail.com> wrote:
>>
>>>>> WANT $=
>>>>> : }}? 2DUP "}}" $= ;
>>
>>>> With an ANS Forth I can't compile this.  I get three undefined words
>>>> error messages:
>>
>>>> WANT
>>>> $=
>>>> "}}"
>>> I think WANT is the equivalent of a #include in C. Is this ciForth? So
>>> WANT conditionally includes $= if it's not already in memory.
>>> Presumably.
>>
>> Maybe someday there will some kind of standardization effort for this
>> kind of stuff.  Might prove useful.
>>
>> -Doug
>
> I also thought $= was quite useful, so I set about writing a version.
> I found it quite torturous to write! I'd be interested to see other
> versions.
>
> : $= ( addr1 len1 addr2 len2 -- flag)
>    2 pick <> if drop 2drop false else rot begin
>      dup c@ >r 1+ -rot dup c@ >r 1+ -rot
>      r> r> = if 1- else drop -1 then dup >r -rot
>    r> 0<= until then ;
>
> Quite a lot of return stack bashing required. It works by via a
> BEGIN...UNTIL loop, checking each character. The length is decremented
> each time a character is checked. If two characters are different, it
> sets the length to -1. The UNTIL loop terminates with a 0<= so the
> loop exits early if a difference is found. If the string is exactly
> equal, then the length will have been decremented to 0 (duh!) since
> every character will have been checked. If the length is found to be
> -1 then the strings were not equal. This is taken care of with the
> final 0= at the end.
>
> Here it is showing the stack:
> (a=address l=length)
>
> rot                         \ l1 a2 a1
> begin
>    dup c@ >r 1+              \ l1 a2 a1       r: c1
>    -rot                      \ a1 l1 a2       r: c1
>    dup c@ >r 1+              \ a1 l1 a2       r: c1 c2
>    -rot                      \ a2 a1 l1       r: c1 c2
>    r> r> =                   \ a2 a1 l1 flag  r: --
>    if 1- else drop -1 then   \ a2 a1 l1/0     r: --
>    dup >r                    \ a2 a1 l1/0     r: l1/0
>    -rot                      \ l1/0 a2 a1     r: l1/0
> r> 0<= until                \ l1/0 a2 a1     r: --
> 2drop                       \ l1/0
> 0=                          \ flag
> then
>
> Is there an easier way (that is, showing the *implementation* not just
> some high level word). I was surprised at how difficult it was. It's
> much easier in C!
>
> In fairness, I think this type of routine is a good candidate for
> locals or variables. With locals the difficulty would evaporate I
> think. C, of course, has locals/variables. I was trying to see if I
> could do it without variables, however. What would seasoned Forth
> programmers do here? Reach for locals/variables or is there something
> much more obvious that I'm missing?
>

No need for locals at all. Just factor a bit. Try the following. (By the 
way, I prefer the name STR= rather than $=. I'm used to it now I suppose.)

[undefined] bounds [if]
: bounds    \ addr len -- addrhi addrlo
     over + swap
;
[then]

: s=    \ addr1 addr2 len -- flag
     bounds ?do
       dup c@ i c@ <>      \ addr1 flag1
       if drop unloop FALSE exit then
       char+
     loop
     drop True
;

: str=      ( addr1 len1 addr2 len2 -- flag)
     rot tuck =              \ addr1 addr2 len2 flag1
     if s=                   \ flag
     else drop 2drop FALSE   \ false
     then
;

Or, less efficient but without the IF..ELSE..THEN, you could define..

: str=      ( addr1 len1 addr2 len2 -- flag)
     rot 2dup = >r       \ addr1 addr2 len1 len2         R: flag1
     min s= r> and       \ flag
;


Regards,

Graham

-- 
GCS

[toc] | [prev] | [next] | [standalone]


#17010

FromJosh Grams <josh@qualdan.com>
Date2012-11-03 16:38 +0000
Message-ID<5095486f$0$20164$882e7ee2@usenet-news.net>
In reply to#16917
Doug Hoffman wrote: <5091b13f$0$282$14726298@news.sunsite.dk>
> On 10/31/12 6:07 PM, Mark Wills wrote:
>> On Oct 31, 4:22 pm, Doug Hoffman <glide...@gmail.com> wrote:
>
>>>
>>>> WANT $=
>>>> : }}? 2DUP "}}" $= ;
>>>
>>> With an ANS Forth I can't compile this.  I get three undefined words
>>> error messages:
>>>
>>> WANT
>>> $=
>>> "}}"
>
>
>> I think WANT is the equivalent of a #include in C. Is this ciForth? So
>> WANT conditionally includes $= if it's not already in memory.
>> Presumably.
>
> Maybe someday there will some kind of standardization effort for this 
> kind of stuff.  Might prove useful.

I've been working on one possible solution (a package database and
package loader) to this sort of trivial incompatibility issue in fits
and starts.  In August I wrote a working proof-of-concept implementation
and Gerry Jackson ported it to several systems.  Then I got bogged down
trying to figure out what to do next and how to modify the design to fix
the flaws that turned up, so I have only done minor work on it since
then.  But I think I finally have that all worked out and I'm hoping to
have something release-worthy by the beginning of 2013.

If you're impatient, you can check out the WIP from the mercurial
repository at <https://code.google.com/p/halfpence/>.  There is a bit of
documentation in the README (I just updated it so it matches the current
code), and I've been trying to be careful to refactor the code in small
bits and always keep the public repository in a working state.

--Josh

[toc] | [prev] | [next] | [standalone]


#16900

FromMark Wills <forthfreak@gmail.com>
Date2012-10-31 14:26 -0700
Message-ID<b9d6a600-408f-4d3a-b7bc-5f5a20dd6438@l7g2000vbj.googlegroups.com>
In reply to#16867
On Oct 31, 3:27 pm, alb...@spenarnc.xs4all.nl (Albert van der Horst)
wrote:
> In article <70a117c1-ba9f-474b-97f3-6440be3d4...@k20g2000vbj.googlegroups.com>,
> Mark Wills  <forthfr...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> >The following routine is checking to see if a string is "}}" i.e.
> >consists of two consequtive right curly braces.
>
> >: }}? ( addr len -- addr len flag)
> >  dup 2= if
> >    over dup c@   swap 1+ c@   125 =   swap 125 =   and
> >  else
> >    false
> >  then ;
>
> >As can be seen, the first check is the length; if the length is not
> >exactly 2 then we just return false. If the length is 2 then we check
> >to see if both characters are ASCII 125. That's the bit I am looking
> >at and saying "Meh... seems a bit convoluted/lengthy.
>
> >Is there a better way?
>
> >I was thinking maybe:
>
> >... c@ 125 OR swap   1+ c@ 125 OR  125 XOR 0=
>
> >Which is perhaps "cleverer" but not as clear as to the intention of
> >the code and no shorter...
>
> I can't help it.
>
> WANT $=
> : }}? 2DUP "}}" $= ;
>
> As a general point, unless you want to go the c-abomination of zero-ended
> strings, it can't be helped that you have to consider the length as well
> as the content of the string.
>
> Groetjes Albert

Wow! That's a nice command!

[toc] | [prev] | [next] | [standalone]


#16947

Fromrickman <gnuarm@gmail.com>
Date2012-11-01 13:42 -0400
Message-ID<k6ucab$l75$1@dont-email.me>
In reply to#16900
On 10/31/2012 5:26 PM, Mark Wills wrote:
> On Oct 31, 3:27 pm, alb...@spenarnc.xs4all.nl (Albert van der Horst)
> wrote:
>>
>> I can't help it.
>>
>> WANT $=
>> : }}? 2DUP "}}" $= ;
>>
>> As a general point, unless you want to go the c-abomination of zero-ended
>> strings, it can't be helped that you have to consider the length as well
>> as the content of the string.
>>
>> Groetjes Albert
>
> Wow! That's a nice command!

I agree...

WANT $$$

Rick

[toc] | [prev] | [next] | [standalone]


#16884

FromGraham <""gray\"@forthman@plus.com">
Date2012-10-31 17:05 +0000
Message-ID<88idnfK2yvnpxwzNnZ2dnUVZ8sednZ2d@bt.com>
In reply to#16855
On 31/10/2012 11:58, Mark Wills wrote:
> The following routine is checking to see if a string is "}}" i.e.
> consists of two consequtive right curly braces.
>
> : }}? ( addr len -- addr len flag)
>    dup 2= if
>      over dup c@   swap 1+ c@   125 =   swap 125 =   and
>    else
>      false
>    then ;
>
> As can be seen, the first check is the length; if the length is not
> exactly 2 then we just return false. If the length is 2 then we check
> to see if both characters are ASCII 125. That's the bit I am looking
> at and saying "Meh... seems a bit convoluted/lengthy.
>
> Is there a better way?
>
> I was thinking maybe:
>
> .... c@ 125 OR swap   1+ c@ 125 OR  125 XOR 0=
>
> Which is perhaps "cleverer" but not as clear as to the intention of
> the code and no shorter...
>

There's the 'obvious' way:

: }}? ( addr len -- addr len flag)
     2dup 2 = over c@ 125 = and swap 1+ c@ 125 = and
;

But why not the more conventional one

: }}? ( addr len -- flag)
     2 = over c@ 125 = and swap 1+ c@ 125 = and
;



-- 
GCS

[toc] | [prev] | [next] | [standalone]


#16893

FromPeter Fälth <peter.falth@tin.it>
Date2012-10-31 12:07 -0700
Message-ID<15b420a5-bc89-4bba-a1fb-6b440d893a4d@ib4g2000vbb.googlegroups.com>
In reply to#16884
On Oct 31, 7:10 pm, Graham <""gray\"@forth...@plus.com"> wrote:
> On 31/10/2012 11:58, Mark Wills wrote:
>
>
>
>
>
>
>
>
>
> > The following routine is checking to see if a string is "}}" i.e.
> > consists of two consequtive right curly braces.
>
> > : }}? ( addr len -- addr len flag)
> >    dup 2= if
> >      over dup c@   swap 1+ c@   125 =   swap 125 =   and
> >    else
> >      false
> >    then ;
>
> > As can be seen, the first check is the length; if the length is not
> > exactly 2 then we just return false. If the length is 2 then we check
> > to see if both characters are ASCII 125. That's the bit I am looking
> > at and saying "Meh... seems a bit convoluted/lengthy.
>
> > Is there a better way?
>
> > I was thinking maybe:
>
> > .... c@ 125 OR swap   1+ c@ 125 OR  125 XOR 0=
>
> > Which is perhaps "cleverer" but not as clear as to the intention of
> > the code and no shorter...
>
> There's the 'obvious' way:
>
> : }}? ( addr len -- addr len flag)
>      2dup 2 = over c@ 125 = and swap 1+ c@ 125 = and
> ;
>
> But why not the more conventional one
>
> : }}? ( addr len -- flag)
>      2 = over c@ 125 = and swap 1+ c@ 125 = and
> ;
>
> --
> GCS

If this is a 16 bit Forth you can simplify further

: }}?  ( addr len -- f)
     2 = swap @ $7D7D = and ;

or if you need to be sure not to fetch outside the string

: }}?  ( addr len -- f)
     2 = if @ $7D7D = exit then
          drop false ;

BR
Peter

[toc] | [prev] | [next] | [standalone]


#16895

FromPaul Rubin <no.email@nospam.invalid>
Date2012-10-31 12:12 -0700
Message-ID<7x7gq6e9r9.fsf@ruckus.brouhaha.com>
In reply to#16893
Peter Fälth <peter.falth@tin.it> writes:
> If this is a 16 bit Forth you can simplify further
> : }}?  ( addr len -- f)
>      2 = swap @ $7D7D = and ;

What if addr is not on a word boundary?

[toc] | [prev] | [next] | [standalone]


#16898

FromMark Wills <forthfreak@gmail.com>
Date2012-10-31 14:17 -0700
Message-ID<3aceee25-4ec8-45a1-89f0-60923d8d713c@u9g2000vbm.googlegroups.com>
In reply to#16895
On Oct 31, 7:12 pm, Paul Rubin <no.em...@nospam.invalid> wrote:
> Peter Fälth <peter.fa...@tin.it> writes:
> > If this is a 16 bit Forth you can simplify further
> > : }}?  ( addr len -- f)
> >      2 = swap @ $7D7D = and ;
>
> What if addr is not on a word boundary?

That's a great solution Peter, but as Paul mentioned, it's a problem
if the string doesn't fall on a word boundary. Unfortunately, that is
*always* the case the with my system. For example, S" HELLO" compiles
as (S") 5 H E L L O  where (S") is a 16 bit word (address of (S")) 5
is the length byte, and then the bytes of the string follow.

Lovely solution though!

[toc] | [prev] | [next] | [standalone]


#16899

FromMark Wills <forthfreak@gmail.com>
Date2012-10-31 14:21 -0700
Message-ID<444a8100-4c49-4f71-ba2c-ca7ac8e18e11@l7g2000vbj.googlegroups.com>
In reply to#16884
On Oct 31, 5:10 pm, Graham <""gray\"@forth...@plus.com"> wrote:
> There's the 'obvious' way:
>
> : }}? ( addr len -- addr len flag)
>      2dup 2 = over c@ 125 = and swap 1+ c@ 125 = and
> ;
>

I think this the winner so far, without implementing COMPARE of
course :-)

My code is a close second! ;-)

I like how Graham's code does not require and IF/ELSE/THEN. Very nice.

[toc] | [prev] | [next] | [standalone]


#16905

FromPablo Hugo Reda <pabloreda@gmail.com>
Date2012-10-31 14:50 -0700
Message-ID<b0115c55-7cb6-420f-b10e-fe7af6cd041d@googlegroups.com>
In reply to#16899
Why not?

: }}? ( addr len -- addr len flag)
	over w@ $7b7b = ;

[toc] | [prev] | [next] | [standalone]


#16906

FromPablo Hugo Reda <pabloreda@gmail.com>
Date2012-10-31 14:51 -0700
Message-ID<4907f60b-3c96-49b0-9627-1d4c4e21348b@googlegroups.com>
In reply to#16905
El miércoles, 31 de octubre de 2012 18:50:19 UTC-3, Pablo Hugo Reda  escribió:
> Why not?
> 
> 
> 
> : }}? ( addr len -- addr len flag)
> 
> 	over w@ $7b7b = ;

sorry $7d7d

[toc] | [prev] | [next] | [standalone]


#16907

FromPaul Rubin <no.email@nospam.invalid>
Date2012-10-31 14:57 -0700
Message-ID<7x7gq6xq2n.fsf@ruckus.brouhaha.com>
In reply to#16906
Pablo Hugo Reda <pabloreda@gmail.com> writes:
> El miércoles, 31 de octubre de 2012 18:50:19 UTC-3, Pablo Hugo Reda  escribió:
>> Why not?
>> : }}? ( addr len -- addr len flag)
>> 	over w@ $7b7b = ;
> sorry $7d7d

1) not sure if that works if addr is not a word boundary
2) returns wrong value if len != 2.

[toc] | [prev] | [next] | [standalone]


#16913

FromCoos Haak <chforth@hccnet.nl>
Date2012-10-31 23:47 +0100
Message-ID<1u5k6su0nrh19.cef4brsvydxu$.dlg@40tude.net>
In reply to#16907
Op Wed, 31 Oct 2012 14:57:20 -0700 schreef Paul Rubin:

> Pablo Hugo Reda <pabloreda@gmail.com> writes:
>> El miércoles, 31 de octubre de 2012 18:50:19 UTC-3, Pablo Hugo Reda  escribió:
>>> Why not?
>>> : }}? ( addr len -- addr len flag)
>>> 	over w@ $7b7b = ;
>> sorry $7d7d
> 
> 1) not sure if that works if addr is not a word boundary
> 2) returns wrong value if len != 2.

That's why Hugo uses W@: a 16 bit fetch. Gforth, Swiftforth, Win32Forth
have this.
There were proposals in the past to call a 32 bits fetch L@ (long) but
native (cell-wide) fetch kept the name @.
@ is 32 bits fetch in a 32 bit Forth and 64 bits fetch in a 64 bit Forth.
There seems little need for a 32 bits fetch in 64 bit Forths.

Ha, now I know why 64 bit Ciforth has L@ and L!

-- 
Coos

CHForth, 16 bit DOS applications
http://home.hccnet.nl/j.j.haak/forth.html 

[toc] | [prev] | [next] | [standalone]


#16957

Frommhx@iae.nl (Marcel Hendrix)
Date2012-11-01 21:28 +0200
Message-ID<09071402928435@frunobulax.edu>
In reply to#16913
Coos Haak <chforth@hccnet.nl> writes Re: Is there a better way?

[..]
> There were proposals in the past to call a 32 bits fetch L@ (long) but
> native (cell-wide) fetch kept the name @.
> @ is 32 bits fetch in a 32 bit Forth and 64 bits fetch in a 64 bit Forth.

> There seems little need for a 32 bits fetch in 64 bit Forths.
[,,]

Wrong!

reference:
@+    2840 times

32b@   164 times
32b@+	42 times
s32b@   27 times ( signed fetch )
s32B@+	 8 times

32b,   101 times
32b!    98 times
32b+!   98 times
32b!+	 4 times

32B2@	 7 times
32B2!	 3 times

Most of these happen when converting sources that explicitly use 
32-bittedness (cryptography, zipping etc., etc.).
A very large percentage is from interfacing with C libraries.

-marcel

[toc] | [prev] | [next] | [standalone]


#16910

FromMark Wills <forthfreak@gmail.com>
Date2012-10-31 15:11 -0700
Message-ID<70973a11-341f-410f-8e40-84aa3a984d1f@d17g2000vbv.googlegroups.com>
In reply to#16905
On Oct 31, 9:50 pm, Pablo Hugo Reda <pablor...@gmail.com> wrote:
> Why not?
>
> : }}? ( addr len -- addr len flag)
>         over w@ $7b7b = ;

Hi Pablo. What is W@ ?

[toc] | [prev] | [next] | [standalone]


#16912

FromPablo Hugo Reda <pabloreda@gmail.com>
Date2012-10-31 15:44 -0700
Message-ID<6dfc350f-3c09-4f94-90ca-cef4afbc7b12@googlegroups.com>
In reply to#16910
El miércoles, 31 de octubre de 2012 19:11:10 UTC-3, M.R.W Wills  escribió:
> On Oct 31, 9:50 pm, Pablo Hugo Reda <pablor...@gmail.com> wrote:
> 
> > Why not?
> 
> >
> 
> > : }}? ( addr len -- addr len flag)
> 
> >         over w@ $7b7b = ;
> 
> 
> 
> Hi Pablo. What is W@ ?

Hi, 
if c@ get a byte.. w@ get a word.. 

sorry, I use my own forth
about the len.. I use 0 delimited string.. i not need worry 

[toc] | [prev] | [next] | [standalone]


#16948

Fromrickman <gnuarm@gmail.com>
Date2012-11-01 13:55 -0400
Message-ID<k6ud25$sc4$1@dont-email.me>
In reply to#16912
On 10/31/2012 6:44 PM, Pablo Hugo Reda wrote:
> El miércoles, 31 de octubre de 2012 19:11:10 UTC-3, M.R.W Wills  escribió:
>> On Oct 31, 9:50 pm, Pablo Hugo Reda<pablor...@gmail.com>  wrote:
>>
>>> Why not?
>>
>>>
>>
>>> : }}? ( addr len -- addr len flag)
>>
>>>          over w@ $7b7b = ;
>>
>>
>>
>> Hi Pablo. What is W@ ?
>
> Hi,
> if c@ get a byte.. w@ get a word..
>
> sorry, I use my own forth
> about the len.. I use 0 delimited string.. i not need worry

I think you miss the point.  Your code will say that the string "}}" 
matches as well as "}}}", "}}}}", etc.  It needs to check length as well 
as just the first two chars.

Rick

[toc] | [prev] | [next] | [standalone]


Page 8 of 9 — ← Prev page 1 2 3 4 5 6 7 [8] 9  Next page →

Back to top | Article view | comp.lang.forth


csiph-web