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: a07f3367d7,c9d5fc258548b22a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!newsfeed.straub-nv.de!news.musoftware.de!wum.musoftware.de!weretis.net!feeder3.news.weretis.net!feeder.news-service.com!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 07 Feb 2011 19:10:12 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How do I write directly to a memory address? References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <31c357bd-c8dc-4583-a454-86d9c579e5f4@m13g2000yqb.googlegroups.com> <05a3673e-fb97-449c-94ed-1139eb085c32@x1g2000yqb.googlegroups.com> <8r86vgFc3uU1@mid.individual.net> <19fh1chm74f9.11cws0j5bckze.dlg@40tude.net> <4d4ff70e$0$6886$9b4e6d93@newsspool2.arcor-online.net> <737a6396-72bd-4a1e-8895-7d50f287960e@d28g2000yqc.googlegroups.com> <4d5008a5$0$6879$9b4e6d93@newsspool2.arcor-online.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4d503584$0$6771$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 07 Feb 2011 19:10:12 CET NNTP-Posting-Host: 5b14b7e6.newsspool3.arcor-online.net X-Trace: DXC=0>VME8B9A::Lh>_cHTX3j==;CnbgA5j42 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:16942 Date: 2011-02-07T19:10:12+01:00 List-Id: On 07.02.11 16:21, Dmitry A. Kazakov wrote: >> It means that Ada function Ada.Numerics.Discrete_Random.Random >> only works because it violates its "contract". The parameter (a >> generator object) is passed "in", but is modified. Its mutation >> is one effect of calling function Random. > > Wrong. You might have an implementation of Random backed by the hardware in > which case Random would have no internal state whatsoever. An implementation does not specify the language. By the language, Random relies on the fact that whenever it is finished, it will deliver the "next" value ("from its generator"). The state of a Generator can be saved and restored, so the notion of its state is meaningful in the abstract. Since we are discussion the effects of subprogram specs on programmer intuition, Random's parameter Gen being of mode "in" is at odds with the usual meaning of "in".