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


Groups > comp.lang.forth > #58926

Re: Rosetta: Babbage problem

Path csiph.com!fu-berlin.de!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
From Lars Brinkhoff <lars.spam@nocrew.org>
Newsgroups comp.lang.forth
Subject Re: Rosetta: Babbage problem
Organization nocrew
References <oerulu$1tuq$1@gioia.aioe.org> <ab981ee5-550e-4be0-ad5d-39471ce05e2e@googlegroups.com> <87mvall6l5.fsf@nightsong.com> <799db5cd-cad1-4fd3-999d-e0effce1fd80@googlegroups.com>
Date Wed, 10 May 2017 09:06:00 +0200
Message-ID <864lwtb38n.fsf@molnjunk.nocrew.org> (permalink)
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Cancel-Lock sha1:3rDTLQbeNBBPSFv/7lQA1IqbdBs=
MIME-Version 1.0
Content-Type text/plain
Lines 12
NNTP-Posting-Host 178.18.91.250
X-Trace news.sunsite.dk DXC=24><JbmVl7^l<TLD@03MfXYSB=nbEKnk[:02ZWQ`i[jTnY:6X7^ZBNWI57e>YZ9SO[1HBfORCSCcSD5J_h8H;EFSI2Ic:1WDKBS
X-Complaints-To staff@sunsite.dk
Xref csiph.com comp.lang.forth:58926

Show key headers only | View raw


Julian Fondren wrote:
> Paul Rubin wrote:
>> : check ( n -- flag ) dup * 1000000 mod 269696 = ;
>> : go ( -- ) 0 begin 1+ dup check if . exit then again ; 
>
>   : go ( -- ) 0 begin 1+ dup check until . ;  ok

I believe Thinking Forth advises to not pass around boolean flags, but
to act on the information as soon as possible.  In that vein:

: check ( n -- ) dup * 1000000 mod 269696 = if . quit then ;
: go   0 begin 1+ dup check again ;

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


Thread

Rosetta: Babbage problem "Robert L." <No_spamming@noWhere_7073.org> - 2017-05-09 08:29 +0000
  Re: Rosetta: Babbage problem mhx@iae.nl - 2017-05-09 12:58 -0700
    Re: Rosetta: Babbage problem Paul Rubin <no.email@nospam.invalid> - 2017-05-09 20:43 -0700
      Re: Rosetta: Babbage problem Julian Fondren <julian.fondren@gmail.com> - 2017-05-09 23:43 -0700
        Re: Rosetta: Babbage problem Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-10 09:06 +0200
          Re: Rosetta: Babbage problem Julian Fondren <julian.fondren@gmail.com> - 2017-05-10 00:27 -0700
            Re: Rosetta: Babbage problem Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-10 09:32 +0200
          Re: Rosetta: Babbage problem Paul Rubin <no.email@nospam.invalid> - 2017-05-10 00:59 -0700
            Re: Rosetta: Babbage problem Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-05-10 08:14 -0500
      Re: Rosetta: Babbage problem mhx@iae.nl - 2017-05-10 02:59 -0700
        Re: Rosetta: Babbage problem Bruno Gauthier <bgauthier@free.fr> - 2017-05-15 12:25 +0200
          Re: Rosetta: Babbage problem mhx@iae.nl - 2017-05-15 04:17 -0700
            Re: Rosetta: Babbage problem Bruno Gauthier <bgauthier@free.fr> - 2017-05-15 13:48 +0200
              Re: Rosetta: Babbage problem Julian Fondren <julian.fondren@gmail.com> - 2017-05-15 04:56 -0700
                Re: Rosetta: Babbage problem Bruno Gauthier <bgauthier@free.fr> - 2017-05-15 16:33 +0200
              Re: Rosetta: Babbage problem mhx@iae.nl - 2017-05-15 10:53 -0700
              Re: Rosetta: Babbage problem albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-05-15 21:39 +0200
  Re: Rosetta: Babbage problem "Robert L." <No_spamming@noWhere_7073.org> - 2017-05-18 09:23 +0000
    Re: Rosetta: Babbage problem "Robert L." <No_spamming@noWhere_7073.org> - 2017-05-18 09:29 +0000

csiph-web