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-Thread: 103376,5af5c381381ac5a7 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Ada requires too much typing! Date: Thu, 10 Jun 2010 16:29:21 +0200 Organization: Adalog Message-ID: References: <4c0decf7$0$6759$9b4e6d93@newsspool3.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 10 Jun 2010 14:29:32 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="Dn22F68J9CHYFQQlT81DGA"; logging-data="3629"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HOiNK/QzPzPQCEF0eaVGF" User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) In-Reply-To: Cancel-Lock: sha1:kYbOhi4iJY9k+OxTMHXk8HdjcKQ= Xref: g2news2.google.com comp.lang.ada:12568 Date: 2010-06-10T16:29:21+02:00 List-Id: Alex R. Mosteo a �crit : > Martin Krischik wrote: > > (...) > >> function f returns Integer >> >> package i is >> g : Integer := 0; >> end i; >> >> begin >> i.g := i.g + 1; >> return i.g; >> end f; > > Do you mean that i.g retains value across calls here? Never saw this > construct before, and not what I would have thought... interesting. No! In Ada, no construct lives longer than its scope (unlike C static variables) -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr