home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / forth / 3987 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.1 KB  |  27 lines

  1. Newsgroups: comp.lang.forth
  2. Path: sparky!uunet!gatech!destroyer!cs.ubc.ca!newsserver.sfu.ca!sfu.ca!rolfe
  3. From: rolfe@fraser.sfu.ca (Christopher John Rolfe)
  4. Subject: +LOOP in JFORTH
  5. Message-ID: <rolfe.727955617@sfu.ca>
  6. Sender: news@sfu.ca
  7. Organization: Simon Fraser University, Burnaby, B.C., Canada
  8. Date: Mon, 25 Jan 1993 09:53:37 GMT
  9. Lines: 16
  10.  
  11.     What's the deal with 'DO' and '+LOOP' in JFORTH?
  12.     Normally it's
  13.     : myword limit index DO increment +LOOP ;
  14. If you want a loop to decrement with '-1 +LOOP', in some FORTHS you
  15. have to put a  strange number in limit ( as in EMACS where the loop
  16. always ends at the boundary between 'limit' and 'limit minus 1' ).  
  17. But in JFORTH I can't seem to get a decrementing loop at all.  Perhaps there
  18. is an error check to see if index is less than limit?  But then WHY
  19. have the word '+LOOP'???
  20.  
  21. Puzzled.
  22. -- 
  23. Chris                   | 2617 East 4th,| [047] [037] 
  24. rolfe@sfu.ca            | Van., B.C.    | that serial, major/minor, 
  25. Simon Fraser University | V5M 1K5       | tonic/subdom, inversion
  26. Burnaby,  Canada        | Canada        | thing is hurting my brain.
  27.