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: a07f3367d7,c9d5fc258548b22a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!feeder.news-service.com!news.netcologne.de!newsfeed-fusi2.netcologne.de!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool4.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="iso-8859-1" Content-Transfer-Encoding: 8bit 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> <5d9bd120-4953-4fb1-a890-27267245e954@8g2000prt.googlegroups.com> <544076dc-3357-4d8d-bfeb-7ae46a88b931@w19g2000yqa.googlegroups.com> <9bt91saw1vao$.9o7azvb4ina6$.dlg@40tude.net> <1aragtrfhwg4w$.1c1eyyf8254pw$.dlg@40tude.net> Date: Wed, 9 Feb 2011 22:38:27 +0100 Message-ID: NNTP-Posting-Date: 09 Feb 2011 22:38:25 CET NNTP-Posting-Host: 0310fa24.newsspool2.arcor-online.net X-Trace: DXC=L`lB=GOmh[E2:OR3:3gaE@A9EHlD;3YcB4Fo<]lROoRA8kF On Wed, 9 Feb 2011 13:07:55 -0800 (PST), Maciej Sobczak wrote: > On Feb 9, 9:43�am, "Dmitry A. Kazakov" > wrote: > >>>>> q.e.d. what? >> >>>> 1. const T /= T >>>> 2. not (const T <: T) >> >>> That's of course very interesting, but does not relate to the example >>> that we are discussing. >> >> It does, because const T is the type of the actual parameter and T is the >> type of the formal parameter. > > No, because formal and actual are distinct objects in C. So what? It seems that you are confusing parameter passing mode and substitution. >>> No. According to the C standard (6.5.2.2/4) this is *assignment*. >> >> Making local copies requires copy constructor. That's for sure. > > For sure the word "constructor" does not appear in the C standard, not > even once, so I would not bet my money on this requirement. I used the term constructor because semantically this is not an assignment. Assignment destroys the target and then constructs new object. When the parameter is copied-in it is semantically only construction (+allocation). >> But this is >> unrelated to the substitution, which is always there when you call a >> subprogram with parameters and/or results. > > In C you don't call a subprogram with parameters, they are assigned - > you seem to try to apply the Ada terminology to C and you go nowhere > with this. No, I am applying a typed language terminology. I don't care how C or Ada name these things. For example, pointer is pointer even when "access" in Ada. Since the word "contract" is probably not even mentioned in the C standard, it makes no sense to discuss it in the way you do. You could start just with this and spare net traffic. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de