Re: GOTO
- Posted by Everett Williams <rett at GVTC.COM> Nov 16, 1999
- 640 views
On Mon, 15 Nov 1999 20:58:04 -0500, Liquid-Nitrogen Software <nitrogen_069 at HOTMAIL.COM> wrote: >>I love that construct. It allows exit from any depth of for without any >>knowledge of what that depth is. Now if we can have something of the >>form of >> >>while(A) x = 1 do >> while(B) y = 2 do >> while(C) z = 3 do >> >> ... >> >> exit(A) >> >> end while >> end while >>end while > > >how about: > > while:A x = 1 do > while y = 2 do > while z = 3 do > > ... > > exit:A > > end while > end while > end while > >-- >That way it won't break existing code, and you get a choice of only naming >the loops that you realy need to. > >you can then either use: > while / exit > or > while:label / exit:label > >I think that seems like quite a tidy way to fix that problem. > >-Mark. Funny you should ask, I was planning to retain the original forms and my purpose was to avoid adding labels. The less we ask for, the more likely we are to get it. Besides, I don't really want labels. They would create a demand for goto...again and that I consider anathema. There should be a slightly better syntax that would preserve those goals, but my tired old brain just won't kick one out right now. Somebody else take a shot. Everett L.(Rett) Williams rett at gvtc.com