Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!ic.Berkeley.EDU!faustus From: faustus@ic.Berkeley.EDU (Wayne A. Christopher) Newsgroups: comp.lang.misc Subject: Re: From Modula to Oberon Message-ID: <1557@pasteur.Berkeley.Edu> Date: 15 Mar 88 08:15:22 GMT References: <2827@enea.se> Sender: news@pasteur.Berkeley.Edu Lines: 17 In article <2827@enea.se>, sommar@enea.se (Erland Sommarskog) writes: > ... Ada as I see it have > the perfect solution: The loop variable is declared in the FOR- > statement, and is thus not accessible afterwards. Here's the problem with that construct: I often write for (i = 0; i < max; i++) if (something) break; if (i == max) ... If the loop variable is inaccessible outside of the loop there's no way to tell how it terminated, except by using an extra flag, which is ugly. Wayne