comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Weird Bug in Get_Line
Date: Wed, 26 Apr 2017 22:44:05 +0200
Date: 2017-04-26T22:44:05+02:00	[thread overview]
Message-ID: <odr0km$tc1$1@dont-email.me> (raw)
In-Reply-To: <dcbbef9d-87c5-472b-8114-faf1f5b1deef@googlegroups.com>

On 04/26/2017 09:32 PM, Brian Kolden wrote:
>
> That's fair, however, the functionality of Text_IO is currently inconsistent.
> I feel that it should either be reworked to always throw the exception or
> not. At the moment, it comes across as a logical error since it will only
> complain at a few, very specific line lengths.

What you've found is, as Wright pointed out, an error in GNAT's attempt to 
handle foreign files reasonably that has already been corrected, at least in the 
Pro version.

TBH, handling last lines without a line terminator as if they had a line 
terminator is not easy. Much thought was needed to get PragmARC.Text_IO, which 
handles Mac (CR), Unix (LF), and Windows (CR-LF) line terminators, to do it.

-- 
Jeff Carter
"Hold your temper. Count ten.... Now let 'er go.
You got a good aim."
Never Give a Sucker an Even Break
105

  reply	other threads:[~2017-04-26 20:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26  7:38 Weird Bug in Get_Line Brian Kolden
2017-04-26  8:28 ` Brian Drummond
2017-04-26  8:42   ` Brian Kolden
2017-04-26  9:10 ` Brian Kolden
2017-04-26 10:58 ` Simon Wright
2017-04-26 17:03 ` Jeffrey R. Carter
2017-04-26 19:32   ` Brian Kolden
2017-04-26 20:44     ` Jeffrey R. Carter [this message]
2017-05-14 21:49       ` moy
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox