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,UTF8 Path: g2news2.google.com!news2.google.com!npeer01.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: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Ada requires too much typing! Followup-To: comp.lang.ada Date: Fri, 11 Jun 2010 13:57:10 +0200 Organization: A noiseless patient Spider Message-ID: References: <4c0decf7$0$6759$9b4e6d93@newsspool3.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit Injection-Date: Fri, 11 Jun 2010 11:57:05 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="w8g++bW4v3KH0+SqtoCNSw"; logging-data="20453"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18JwlAqefZ1R1V3Ul9+plzr" User-Agent: KNode/4.4.3 Cancel-Lock: sha1:udCNmpACgqhHgWfay66URW0ALaA= Xref: g2news2.google.com comp.lang.ada:12613 Date: 2010-06-11T13:57:10+02:00 List-Id: J-P. Rosen wrote: > 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) Yep, I saw in other reply. I admit it was a most unsettling idea at first sight.