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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8b8f4ad9d302b143,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-30 08:44:50 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: rm@gunlab.com.ru (Roman V. Isaev) Newsgroups: comp.lang.ada Subject: ada loops Date: 30 May 2003 08:44:49 -0700 Organization: http://groups.google.com/ Message-ID: NNTP-Posting-Host: 195.151.20.194 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1054309490 20872 127.0.0.1 (30 May 2003 15:44:50 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 30 May 2003 15:44:50 GMT Xref: archiver1.google.com comp.lang.ada:38108 Date: 2003-05-30T15:44:50+00:00 List-Id: I've got bitten by this (code was translated from pascal by p2ada, so please don't bash using goto): for Ijk in 1 .. 40 loop Sss:=Fnmis-Si(Ijk); if Sss<0.0 then goto Label_1; end if; end loop; -- IJK <> null; Before the loop Ijk is 0, after the loop Ijk is still 0. Huh? Why? I replaced Ijk with temp variable and put Ijk := temp before goto and it solved the problem, but why we can't have final value when we break out of the loop? What's the logic behind this language behaviour? Also when I try to debug this in GVD I can see Ijk variable, but not Sss (it's a global variable described in outer procedure). I see following message in the bottom window: (gdb) print Sss Cannot access memory at address 0x24803ec How to look up these variables?