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!news3.google.com!feeder.news-service.com!xlned.com!feeder1.xlned.com!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 07 Feb 2011 14:43:42 +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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4d4ff70e$0$6886$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 07 Feb 2011 14:43:42 CET NNTP-Posting-Host: 29e97a7b.newsspool2.arcor-online.net X-Trace: DXC=nNW9DWDS=VV<<0iRN7DLEQA9EHlD;3YcR4Fo<]lROoRQ8kFZLh>_cHTX3j]\D_bn`gQ:@_ X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:16925 Date: 2011-02-07T14:43:42+01:00 List-Id: On 07.02.11 10:00, Ludovic Brenta wrote: > In Ada, if you write: > > procedure Foo (Arg : in Integer) is > begin > Arg := 3; > end Foo; > > you get a compile-time error. > > void foo (int arg) { arg = 3; } In C, if you write int foo(const int arg) { arg = 3; } you will get a compile time error. If you write int foo(const int* arg) { *arg = 3; } you will get a compile time error. For further ammunition for Verdun style language comparisons, see function Ada.Numerics.Discrete_Random.Random. I think there are better arguments.