home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.forth
- Path: sparky!uunet!usc!elroy.jpl.nasa.gov!decwrl!csus.edu!netcomsv!mork!xtifr
- From: xtifr@netcom.com (Chris Waters)
- Subject: Re: +LOOP in the Standard
- Message-ID: <a6fm5y+.xtifr@netcom.com>
- Date: Wed, 22 Jul 92 20:12:12 GMT
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
- References: <1992Jul17.122128.27889@email.tuwien.ac.at> <l6lr51INNsvo@appserv.Eng.Sun.COM> <1992Jul22.080702.12713@email.tuwien.ac.at>
- Lines: 39
-
- In <1992Jul22.080702.12713@email.tuwien.ac.at> anton@mips.complang.tuwien.ac.at (Anton Martin Ertl) writes:
-
- >In article <l6lr51INNsvo@appserv.Eng.Sun.COM>, wmb@pi.Eng.Sun.COM (Mitch Bradley) writes:
- >|>
- >|> > As it reads in Basis 15,
- >|> > 2 0 DO 1 +LOOP
- >|> > will loop twice, but
- >|> > -2 0 DO -1 +LOOP
- >|> > will loop three times.
- >|> >
- >|> > Is this in the current dpANS and is this intended?
- >|>
- >|> Yes, and it's the way that Forth systems have always worked.
-
- >Thanks for the reply.
-
- >I have tested it on two systems, TILE Release 2.1 (which claims to be
- >a Forth-83) and a fig-Forth derived system that claims to be a
- >Forth-79. On both systems both loops loop two times.
-
- It's certainly a bug in TILE--the 83 standard does insist that +LOOP
- work as shown above. It's been quite a while since I worked with 79
- standard, but I think that perhaps it *did* work the way that Anton
- wants. In which case Mitch was wrong, but only partly. It's the way
- that (most) Forth systems work, but not the way they've always worked.
-
- I happen to prefer the 83 mechanism (for reasons unrelated to this
- particular issue). There were what I felt (in '83) were good and
- sufficient reasons for this to change. And I suspect that there are far
- more 83-Forth systems out there than 79 systems.
-
- Perhaps a warning in the standard would be appropriate, but it would be
- MUCH MORE NECESSARY if +LOOP worked the way that Anton seems to feel is
- correct. The way above *is* the way that *most* Forth systems work
- today. Choosing *either* the 79 or 83 mechanism is likely to confuse
- someone. But this is an *old* issue. Nearly 10 years old. <sigh>
- --
- Chris Waters | the insane don't | NOBODY for President!
- xtifr@netcom.COM| need disclaimers | Because Nobody's perfect!!
-