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: 103376,68cd50941308f5a9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 09 Dec 2006 22:56:10 -0600 From: "Steve" Newsgroups: comp.lang.ada References: <1165514423.562024.70510@j72g2000cwa.googlegroups.com> Subject: Re: End_Of_File but not really Date: Sat, 9 Dec 2006 20:57:41 -0800 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-RFC2646: Format=Flowed; Original Message-ID: <4-adnQeuHcj3DubYnZ2dnUVZ_oOonZ2d@comcast.com> NNTP-Posting-Host: 24.20.111.245 X-Trace: sv3-ANuzDleNt2k99THhby+pPKaV+TrXIYEUMRoqlPf5JtoU3Ars+4xE9O5+sWsBsLUfz+Brx4gAoUI+I4+!uFBW4SO95QfZD/kERwtOC1qJGPTJNi7FRRJ51eL8U4KhKpvtbJlvxjyPts9pDghEyKEJwN6c/2gw!nF50gZ2pgWbWvw== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.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.32 Xref: g2news2.google.com comp.lang.ada:7871 Date: 2006-12-09T20:57:41-08:00 List-Id: "Randy Brukardt" wrote in message news:oJednfF3KqVVLOXYnZ2dnUVZ_q-dnZ2d@megapath.net... [snip] > > As I noted before, there is absoletely no chance that this behavior (or > any > behavior of Text_IO) would be changed, because there's no possible way for > such a change to the compatible. If the program "knows" about the "lost" > blank line, it might fail badly if the definition was to be changed. So > it's > 23 years too late to fix Text_IO. > Actually... couldn't the "Form" option that is passed to Open include an option that changes the end of file behavior? That wouldn't break old code, but would make new code easier. Steve (The Duck) > The moral is simply to never use Text_IO.End_of_File, but rather handle > End_Error instead. If you try to use End_of_File, you have the potential > of > "losing" the last line of the file, you still can have End_Error raised if > you call Get or Get_Line when there is no character at the end of the > file, your program will run slower, and your program won't be able to read > interactively from the keyboard. It's not worth it, no matter what you > think > about using exceptions for non-errors. > > Randy. > >