Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!dsl.pitt.edu!pitt!willett!ForthNet From: ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: Data Structures Message-ID: <1723.UUL1.3#5129@willett.pgh.pa.us> Date: 13 Sep 90 03:02:09 GMT Organization: String, Scotch tape, and Paperclips. (in Pgh, PA) Lines: 44 Category 3, Topic 20 Message 115 Wed Sep 12, 1990 D.RUFFER [Dennis] at 00:29 EDT Re: DARRYL BIECH > 1.) What is wrong with using the three conventional looping > constructs DO FOR, DO WHILE, and DO UNTIL, and combining them with > IF THEN (ELSE) to create the more complicated control structures I don't rmember the comment you refer to, but what we now have, IMHO is very close you what you are suggesting. Forth uses different commands, so here are the equivalents: Traditional Forth DO FOR -> DO LOOP DO WHILE -> BEGIN WHILE REPEAT DO UNTIL -> BEGIN UNTIL IF THEN (ELSE) -> IF (ELSE) THEN There seems to be a lot of confusion about how these individual operators can be combined, and my understanding is that the current BASIS does not even reflect what it should in this regard (i.e. what has already been passed by the TC). Perhaps only experimentation with a compliant system will tell the real answer, but I have been assured that the following work: BEGIN WHILE UNTIL THEN Thus creating a loop that has two exit points. I made a proposal very early in the proccess for a similar construction. It was rejected in favor of the more powerful generalizations that we have now. I think that is what you are looking for also. > 2.) Why not have counted strings that are optionally null- > terminated? Tradition? It would be a counted string if it was null-terminated. Why not terminate strings with a $? What about a user selectable character? Where would it all end? :-) DaR ----- This message came from GEnie via willett through a semi-automated process. Report problems to: uunet!willett!dwp or dwp@willett.pgh.pa.us