From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,4873305131bf4d94 X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,4873305131bf4d94 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,4873305131bf4d94 X-Google-Attributes: gid103376,public From: Jon S Anthony Subject: Re: Porting (was ADA and Pascal etc) Date: 1997/10/31 Message-ID: #1/1 X-Deja-AN: 287065987 Distribution: world References: <34557f2b.1934172@news.mindspring.com> <63bhta$g2e@bgtnsc03.worldnet.att.net> <345AB871.413A@dynamite.com.au> <63d3sm$ap7$3@darla.visi.com> Organization: PSINet Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Date: 1997-10-31T00:00:00+00:00 List-Id: Matt Austern writes: > The draft C++ standard is quite specific, and not at all random. If > you write > for (int i = 0; i < N; +i) { > // loop body > } > then the scope of the variable i does not extend past the end of the > loop. The same holds for while loops and if statements. ... > I don't know whether Ada has any constructs where an analogous issue > arises. Construct: yes. Issue: no, the semantics are nailed down and have been since Ada83. for I in 1..N loop -- Implicit declaration of I -- loop body end loop; -- End of scope for I /Jon -- Jon Anthony Synquiry Technologies, Ltd., Belmont, MA 02178, 617.484.3383 "Nightmares - Ha! The way my life's been going lately, Who'd notice?" -- Londo Mollari