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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!newsfeed.straub-nv.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: for S'Image use Func?? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4be417b4$0$6992$9b4e6d93@newsspool4.arcor-online.net> Date: Mon, 10 May 2010 19:55:24 +0200 Message-ID: <1qcb6z4i20dyb.1dz2hd4c0vx69.dlg@40tude.net> NNTP-Posting-Date: 10 May 2010 19:55:23 CEST NNTP-Posting-Host: 93bf0cfa.newsspool1.arcor-online.net X-Trace: DXC=SC8A`dabV5f]BlmkiiU@Biic==]BZ:afn4Fo<]lROoRa<`=YMgDjhgbZYUBk^8eT;i[6LHn;2LCVn[ On Mon, 10 May 2010 16:52:18 +0000 (UTC), Warren wrote: > Dmitry A. Kazakov expounded in > news:zvtps4jzmo1z$.mzhapf4p7b4a.dlg@40tude.net: > >> On Mon, 10 May 2010 15:48:19 +0000 (UTC), Warren wrote: >> >>> Another thing that bugs me is that the Ada.Text_IO >>> will not return a LF character (like getchar() in C). >> >> Why should it? It is a text I/O not a stream I/O. > > But if I recall correctly, I also cannot get an > empty string as input. An empty string is still > valid input. Hmm, try this: with Ada.Text_IO; use Ada.Text_IO; procedure Test_In is begin loop declare Input : String := Get_Line; begin exit when Input'Length = 0; end; end loop; end Test_In; >> C's I/O is a disaster, > > You have only listed an opinion when you don't > list specifics. Did you used it? Character input returns integer, file is a number, sometimes a pointer, do you use fseek or lseek? Is errno thread safe in UNIX? (What does C say about threads?) >> I >> do prefer Ada packages for I/O. Formatting/serialization is a totally >> unrelated issue. > > The problem is that Ada should have separated formatting > from I/O (as someone else here has said). Yes, but back in 80's nobody did. FORTRAN, PL/1, C all had it conflated. > C of course did > the same thing, except that they made formatting a string > easier. Easier? It is untyped! There is no thing worse than that. We constantly fight with catching: printf ("%s", X); X is an object of the type having implicit conversion to const * for output purpose. >> I wonder why people paying so much attention to >> admittedly broken and misplaced formatting of Ada.Text_IO in the times >> of GUIs. It won't work anyway. It is not a text anymore. > > Do you enter a picture when login to your favourite GUI > system? A wave file for your password? We still depend > a lot on Text. Look at any database- it's not all about > blobs. No, it is, for instance, about columned output of fixed point numbers in proportional font aligned along the decimal point... -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de