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,71c743c03ed191fe X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-23 13:30:21 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!msc1.onvoy!ply1.onvoy!upp1.onvoy!onvoy.com!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!spool0900.news.uu.net!reader0901.news.uu.net!not-for-mail Date: Mon, 23 Sep 2002 16:32:22 -0400 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Beginer problem: variable array size References: <1032804973.357894@master.nyc.kbcfp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Message-ID: <1032813018.257332@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@mosquito.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1032813019 reader1.ash.ops.us.uu.net 3913 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:29292 Date: 2002-09-23T16:32:22-04:00 List-Id: tmoran@acm.org wrote: > I agree there's a big difference between a program with a literal > numeric constant as a limit and a program that adapts to the resources > available, and the latter is normally better. But the former at least > documents clearly what the limit is. Does it really? That may be the case for the toy program presented here. But what happens when this style of programming is used as a piece of a large project? If the buffer overlow problems so often reported have taught us anything, it's that programmers guess sizes incorrectly. Of course an Ada program wouldn't actually overflow its buffers, but it would fail to process its input correctly - either by ignoring some of it, or by reporting errors and not processing it at all.