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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5afe598156615c8b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Get_Line problem (GNAT bug?) Date: Thu, 07 Dec 2006 17:50:50 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1c1gbc5u9cpvp.1wj1zhhn7q86j$.dlg@40tude.net> <1tua3ke1kfoog.1wqou5d9mwtly.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1165531850 7064 192.74.137.71 (7 Dec 2006 22:50:50 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 7 Dec 2006 22:50:50 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:knlU957tLkRPwn1xxeUgObAjujI= Xref: g2news2.google.com comp.lang.ada:7858 Date: 2006-12-07T17:50:50-05:00 List-Id: "Dmitry A. Kazakov" writes: > No. It is the concept, which is broken. And that wasn't Ada, who broke it, > but crippled operating systems like Windows and Unix. In a proper OS the > line terminator is not a character. Why do you say so? The concept of "sequence of characters", which includes blanks and end-of-line chars, seems pretty good to me. (Other control chars, such as tabs, should be banished to the far side of the moon.) I think the Unix idea -- "line terminator (or separator?) = a particular character" -- is a pretty convenient model. It's certainly convenient for parsing input text: read one char at a time, and deal with it, treating end-of-line as one possible case. E.g., an Ada compiler typically works that way. How much human intellectual effort has been wasted by having to deal with "text mode" versus "binary mode" ftp?! The unix model makes them identical, and if all operating systems had magically agreed on that from the dawn of time, we'd all be better off. To represent end-of-line as TWO characters is just plain stupid. Even a manual typewriter has a single lever that does both (returns the carriage, and feeds the line). Note: I don't know of any Ada compiler that uses Text_IO to read the Ada source code to be compiled. - Bob