home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / forth / 2837 < prev    next >
Encoding:
Text File  |  1992-07-22  |  2.2 KB  |  50 lines

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