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,c9d5fc258548b22a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!news.tornevall.net!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: How do I write directly to a memory address? Date: Fri, 04 Feb 2011 10:35:14 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: 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> <4d4bd59e$0$6893$9b4e6d93@newsspool2.arcor-online.net> NNTP-Posting-Host: 374071e65b79fa143d84f2351c794803 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: 705daeb84b7d4807863a1f06fd0f753e X-Complaints-To: abuse@tornevall.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: <4d4bd59e$0$6893$9b4e6d93@newsspool2.arcor-online.net> X-UserIDNumber: 1738 X-Validate-Post: http://news.tornevall.net/validate.php?trace=705daeb84b7d4807863a1f06fd0f753e X-Complaints-Italiano: Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie X-Posting-User: 0243687135df8c4b260dd4a9a93c79bd Xref: g2news1.google.com comp.lang.ada:16873 Date: 2011-02-04T10:35:14-07:00 List-Id: On 02/04/2011 03:31 AM, Georg Bauhaus wrote: > On 2/4/11 10:24 AM, Ludovic Brenta wrote: >> >> while (message&& *message != 0) > > I think you won't be convincing a C programmer by stipulating that > he has been stupid and passed a null pointer for message. > He hasn't, he has thought about his program. I'm not sure this check for null is useful, but I'm not sure this is a valid objection, either. message is incremented inside the loop. If the initial value isn't null, it's still possible for it to be incremented until it rolls over and becomes null. Of course, if that happens, it's a symptom of another error: message does not contain a terminator byte. -- Jeff Carter "In the frozen land of Nador they were forced to eat Robin's minstrels, and there was much rejoicing." Monty Python & the Holy Grail 70