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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-02 06:36:24 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!news.octanews.net!ash.uu.net!spool.news.uu.net!not-for-mail Date: Mon, 02 Feb 2004 09:36:05 -0500 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: In-Out Parameters for functions References: <1075482385.142744@master.nyc.kbcfp.com> <1%_Sb.6686$bn1.6285@nwrdny02.gnilink.net> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Message-ID: <1075732566.25683@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@carrots.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1075732566 8847 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:5179 Date: 2004-02-02T09:36:05-05:00 List-Id: David Starner wrote: > But Ada can do something about that. For this to be equivalent, you'd have > to be asking for Ada to always return 0 or A(A'First) if you used an index > out of range. No, because in this case there is always a valid result to return, since the results are merely unspecified (i.e., chosen from a legal set of possible outcomes). Why do we want the compiler to pick an arbitrary value instead of specifying which one it picks?