Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!pitt!willett!dwp From: dwp@willett.pgh.pa.us (Doug Philips) Newsgroups: comp.lang.forth Subject: Re: FOR -I -R> NEXT Message-ID: <2382.UUL1.3#5129@willett.pgh.pa.us> Date: 21 Feb 91 01:20:05 GMT References: <437@rc6.urc.tue.nl> Organization: (n.) to be organized. But that's not important right now. Lines: 32 In article <437@rc6.urc.tue.nl>, wsbusup@eutws1.win.tue.nl (Jan Stout) writes: > If the FOR NEXT approach of using 1 parameter is more usefull, > I'd find it strange to recognize this fact by using 0 ?DO LOOP > to express that idea. I agree. DO LOOP and FOR NEXT are not exactly isomorphic, but they overlap by a lot. > MB>(There is one less-serious problem too: what is the name of the FOR .. NEXT > MB>loop index?). > > The key issue, in my view, of the FOR NEXT approach is to keep the index > nameless, and in fact allow no reference to it at all. > This to prevent people to use to VERY implementation-dependant >R R@ R>. I like this idea. It has always bugged me that DO LOOP has muddied the stacks so as to complicate early exit and access to the data stack. BLEAH. My preferred idea (hare freakin' brained) is something more like: Count ' Word-To-Repeat DO-TIMES I'm still up in the air about how and even if, Word-To-Repeat, can tell DO-TIMES to stop early. DO-TIMES should not pollute the data nor the return stacks (I'm a little less adament about the return stack). > PS I like the proposed OBSOLETE (EJ). Me too. -Doug --- Preferred: dwp@willett.pgh.pa.us Ok: {pitt,sei,uunet}!willett!dwp