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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bc1b788806de7f65 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news3.google.com!news.glorb.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Scope of vector Date: Wed, 08 Feb 2006 11:59:16 +0100 Message-ID: <43E9CF04.20808@mailinator.com> References: <1139390027.869164.41200@g43g2000cwa.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net /yGudTkWUKjClML4dEs7rACuR//rufoze2CW/gCz3RbLJ/AnA= User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en In-Reply-To: <1139390027.869164.41200@g43g2000cwa.googlegroups.com> Xref: g2news1.google.com comp.lang.ada:2815 Date: 2006-02-08T11:59:16+01:00 List-Id: rashmi wrote: > dear all > > I am repeatedly looking-up from and appending to a float vector as > shown below. I wish to lookup the new appended vector at the end of > each loop as shown below. But the visibilty of the new appended vector > is limited to the inner Decl-Begin-End block. So kindly help me solve > this problem. > > I get the feeling that if visibility is possible then vector size > cannot be updated and vice versa. > > > for ... loop > > _______________ > | | > | decl. | > | | > <-------- existing Vector is defined here (LI) > | | > _______________ > | | > | Begin | > | | > | <-------- Vector to be appended will be got here (LU) > | | > __________ > | | | | > | | decl. | | > | | <--------- new appended Vector is defined here (LF:=LI+LU) > __________ > | | | | > | | Begin | | > | | | | > | | <------- existing Vector is to be appended here (LF) > | | | | > | | End | | > | | | | > __________ > | | > | <------- How do I lookup the new appended vector here ? > | | > | End | > _______________ > > end loop; > If I understand you correctly, you're attempting to reference a variable that is already out of scope. That's basically impossible. You should move your look-up inside the inner block. declare LI : constant Float_Array := Some_Initializer; begin declare LF : constant Float_Array := LI & Function_Giving_LU; begin -- Here you can use LF end; -- Here you can't use LF anymore, if you are asking that. end;