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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM 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-7-bit Path: g2news1.google.com!postnews.google.com!y12g2000prf.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: How do I write directly to a memory address? Date: Wed, 9 Feb 2011 11:41:44 -0800 (PST) Organization: http://groups.google.com Message-ID: <271ad249-94dd-43d9-b550-59bd8e2208fc@y12g2000prf.googlegroups.com> References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <4d5031fe$0$6765$9b4e6d93@newsspool3.arcor-online.net> <1f229967-d3cf-42b6-8087-c97ee08652f3@i40g2000yqh.googlegroups.com> <4d51169e$0$7657$9b4e6d93@newsspool1.arcor-online.net> <4d51905c$0$19486$882e7ee2@usenet-news.net> <36212a7b-deab-45d9-ac45-aa29cd90c7bc@o18g2000prh.googlegroups.com> <4d51a7bb$0$19486$882e7ee2@usenet-news.net> <4d52b489$0$19486$882e7ee2@usenet-news.net> <9a8njlwvey1p.1a96yvvgdf6yu.dlg@40tude.net> <4d52c5e5$0$19486$882e7ee2@usenet-news.net> <4d52d7d9$0$18057$882e7ee2@usenet-news.net> <1jf3s95v7yrkk.1m7rl9zt042py$.dlg@40tude.net> <4d52e704$0$18057$882e7ee2@usenet-news.net> NNTP-Posting-Host: 174.28.151.164 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1297280504 18050 127.0.0.1 (9 Feb 2011 19:41:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 9 Feb 2011 19:41:44 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y12g2000prf.googlegroups.com; posting-host=174.28.151.164; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0E),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:17137 Date: 2011-02-09T11:41:44-08:00 List-Id: > > It is not. The proof is simple: there exist more than one correct > > implementation. > > Really? Can you prove that the several implementations are > identical? Yes. It takes a bit of doing but check out the proofs of recursive & iterative implementations of functions being identical. The methods used in the implementations are *NOT* identical, but the methods themselves are identical in that for ANY input given they produce the EXACT SAME output. Example, exponentiation: Function Exponent(Base : In Integer; Exp : In Natural) Return Integer is begin case Exp is When 0 => Return 1; When 1 => Return Base; When Others => if Exp mod 2 = 1 then Declare Temp : Integer:= Exp( Base, (Exp-1)/2 ); begin Return Temp * Temp * Base; end; else Declare Temp : Integer:= Exp( Base, Exp/2 ); begin Return Temp * Temp; end; end if; end case; end; AND Function Exponent_2(Base : In Integer; Exp : In Natural) Return Integer is begin Return Result : Integer:= 1 do For Index in 1..Exp loop Result:= Result * Base; end loop; end Return; end; AND Function "**"( Left : In Integer; Right : In Natural ) Return Integer;