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-Thread: a07f3367d7,c689b55786a9f2bd X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!news.mixmin.net!aioe.org!not-for-mail From: =?iso-8859-15?Q?Yannick_Duch=EAne_=28Hibou57=29?= Newsgroups: comp.lang.ada Subject: Re: for S'Image use Func?? Date: Sat, 08 May 2010 00:09:27 +0200 Organization: Ada At Home Message-ID: References: <4be417b4$0$6992$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: USAyO1MNnUeFapd/hHloTg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.53 (Win32) Xref: g2news2.google.com comp.lang.ada:11405 Date: 2010-05-08T00:09:27+02:00 List-Id: Le Fri, 07 May 2010 23:27:55 +0200, Randy Brukardt = a =E9crit: >> Well, that "Put (Num_Errors);" is hiding something. You have to >> instantiate Text_IO.Integer_IO for all the integer types you >> need to output. That's annoying. > > It doesn't work very well, either, if you are outputting to a message = = > box or > to a log manager: in both cases the entire message string has to be = > passed > at once. (That's the case in virtually all of my newer programs.) Not = = > many > real programs do much output to Standard Output. > > Randy. Le Fri, 07 May 2010 23:36:04 +0200, Robert A Duff = a =E9crit: > "Randy Brukardt" writes: > Right, that's exactly what I meant when I said elsewhere in this > thread that it's a good idea to separate formatting from output. > Sometimes you want "format some stuff and dump it immediately > to a file". Other times you want "format some stuff" (and then > sort the messages and grind upon them etc.) and then much later > "send to log manager" or whatever. > > - Bob There are alternatives, and here are two. The first one : the log manager could have an open/close logic to output= a = log line. Open Write chunk Write next chunk ... Close Another alternative I have used some months ago, was to use an abstracti= on = of what a text is : I was passing procedure writing text instead of = strings (to be exact, this was not access to procedures, this was tagged= = types with a single method). I though about it when I faced a brick-wall= = where I could not figure what could be the good minimum and maximum leng= th = for a particular string index type range. Then I though what was relevan= t, = was not so much the strings, instead, this was what was written (that's = = not the same). So I decided to pass procedure writing strings instead of= = strings, so I could drop the trouble with strings allocation I was neede= d = for formating purpose. There was no more strings, just writing of chunks= = of text each one after the other in turn. I'm not to say this is an easy suitable for beginners (as we were also = talking about ease of access for beginners), I'm just exposing this as = example alternatives to the one-string-bulk way. -- = No-no, this isn't an oops ...or I hope (TM) - Don't blame me... I'm just= = not lucky