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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c9d5fc258548b22a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!zen.net.uk!dedekind.zen.co.uk!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: How do I write directly to a memory address? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH 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> <4d503584$0$6771$9b4e6d93@newsspool3.arcor-online.net> Date: Mon, 7 Feb 2011 20:29:56 +0100 Message-ID: <17p1p8rjg25no$.10lqm9791y44y.dlg@40tude.net> NNTP-Posting-Date: 07 Feb 2011 20:29:54 CET NNTP-Posting-Host: 60ecb1bd.newsspool1.arcor-online.net X-Trace: DXC=R\lDfX X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:16947 Date: 2011-02-07T20:29:54+01:00 List-Id: On Mon, 07 Feb 2011 19:10:12 +0100, Georg Bauhaus wrote: > 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. That is specific to the procedure Reset, which is not essential for random number generation. > 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". Not at all. It is Reset, which probably is. Random is perfectly OK. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de