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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no 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-22 06:01:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!newsfeed.news2me.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Beginer problem: variable array size Date: Sun, 22 Sep 2002 09:00:09 -0400 Organization: MindSpring Enterprises Message-ID: References: <38993b18.0209191906.b56b982@posting.google.com> <1032533590.712308@master.nyc.kbcfp.com> NNTP-Posting-Host: d1.56.bd.99 X-Server-Date: 22 Sep 2002 13:01:01 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Xref: archiver1.google.com comp.lang.ada:29253 Date: 2002-09-22T13:01:01+00:00 List-Id: Well, as is often the case, the answer is "It Depends". Yes, there are a number of cases where you don't want to set arbitrary limits on data volume. Usually, these are of significant enough importance, that going to the trouble of developing a proper data structure to hold it is not that big a deal in the grand scheme of things. However, when you're confronted with a student project or some light-duty, quick and dirty app that reasonably approximates the case described earlier (punching in a bunch of numbers to sort...) Its typically not that big a deal to impose some arbitrary (and large) upper limit if it allows you simplicity of implementation. Not everything needs to be a brick outhouse. Of course for any sort of serious production work, its usually the case where you build yourself a library routine to do the job properly once and then just reuse it thousands of times. Assuming you have stuff like this, even the quick and dirty hacks become far more robust at no extra charge. :-) MDC -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jast.mil/ Send Replies To: m c o n d i c @ a c m . o r g "I'd trade it all for just a little more" -- Charles Montgomery Burns, [4F10] ====================================================================== Hyman Rosen wrote in message news:1032533590.712308@master.nyc.kbcfp.com... > > I've talked about this before. Until the GNU people came > along and rewrote the UNIX text utilities, they would > constantly and inconsistently return wrong results because > of arbitrary limits, such as maximum line sizes. To this day, > I cannot use vi on a Sun in an xterm that is "too wide". I > have had text files with lines that were longer than 100000 > characters which I needed to process. Wiring arbitrary limits > into a program because you think that they are large enough > for all uses is a recipe for disaster. >