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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a0833bbed8752e1f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!newshub.sdsu.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Mon, 25 Oct 2004 19:05:31 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <1861614.TWv5A9FgVL@linux1.krischik.com> <4178e979_1@baen1673807.greenlnk.net> <1195374.UMjBCk7lO1@linux1.krischik.com> <1154613.ipZcUgduzp@linux1.krischik.com> Subject: Re: variable lenght strings Date: Mon, 25 Oct 2004 19:06:58 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-1lPw38290nfvF2IMcZVH92Ok78VHjRwdGGbHB56a0Mf3UF1NGU1EywdT9qI/uIyJV1WMXD7mDTIX9/U!TLBd7lBBAjZ9jVmYjN2HDww+xeGdST3lFaZZBtLDfq5oLQ4kDC1SwEZzuC9abKgB2vVe4W8Lj+LR X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.20 Xref: g2news1.google.com comp.lang.ada:5699 Date: 2004-10-25T19:06:58-05:00 List-Id: "Martin Krischik" wrote in message news:1154613.ipZcUgduzp@linux1.krischik.com... > Bj�rn Persson wrote: > > > Martin Krischik wrote: > >> Martin Dowie wrote: > >> > >>>Being added in Ada2005, see Ada.Text_IO.Unbounded_IO in > >>>http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00301.TXT?rev=1.12 > >> > >> Cool. How will it handle a missing CR/LF at the end of file? > > > > There is a brief discussion of that in the AI file. Randy said that the > > implementation has always been required to provide an implicit line > > terminator. > > Well, last time i checked GNAT didn't and raised an end of file exception. My opinion is that GNAT is wrong in that case. A.10(7) makes it quite clear that you can't have a file terminator without a line and page terminator in front of it. I vaguely recall having argued this with Robert Dewar, and I think that they had a different interpretation, based on the idea that a file with a missing CR/LF is incorrect for use with Text_IO. I hope I misremember that, because it is stupid (even if it is logically correct) as it essentially says that you can't read outside generated text files with Text_IO (you can't know whether the file has CR/LFs as required). But I can understand why they wouldn't want to do this properly, because it is a pain to get right, and it saps the performance of Text_IO (since you have the be prepared to check for implied characters for each one you read). Randy.