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,794c64d1f9164710 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-05 15:56:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news-x2.support.nl!psinet-eu-nl!psiuk-p4!uknet!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: functions, packages & characters Date: Tue, 5 Mar 2002 09:36:43 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: <20020221130715.12738.00000034@mb-bg.aol.com> <3C753C66.8020509@mail.com> <3C7BAD52.4050208@mail.com> <3C7C7E2D.6090602@mail.com> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1015339004 17269 136.170.200.133 (5 Mar 2002 14:36:44 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 5 Mar 2002 14:36:44 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:20834 Date: 2002-03-05T14:36:44+00:00 List-Id: I think the situation would be to use something like a 1500 character buffer & go 'round the block to reallocate the Unbounded_String if and only if the line length exceeded the 1500 characters. That way, the only time you'd force any reallocations upon appending to the Unbounded_String would be the case where the line length is greater than the 1500 characters of the buffer. It would perform fast for most of the cases and probably wouldn't perform too bad for the few cases where the line exceeded the buffer. If you're going to Text_IO, you really need to have some kind of fixed length string into which you read. Hence the need for *some* buffer limit - but not necessarly a limit on the line length of the what the program can accept. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Hyman Rosen" wrote in message news:3C7C7E2D.6090602@mail.com... > David Starner wrote: > > 1500 was meant as an arbitrarily large value. > > No arbitrary value is large enough. You *must* provide > for input buffer size limited only by memory constraints, > or you will cause some innocent user needless grief. > > As I said before, my troublesome case was a .newsrc file, > plain text, where one line was several hundred thousand > characters long. Fortunately, I was using tools which > handled it with aplomb. >