comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Problem with Unbounded Strings
Date: Fri, 4 Dec 2015 16:59:33 -0700
Date: 2015-12-04T16:59:33-07:00	[thread overview]
Message-ID: <n3t98j$5pj$1@dont-email.me> (raw)
In-Reply-To: <1957dd23-1034-43fb-b933-c74a7d694207@googlegroups.com>

On 12/04/2015 04:35 PM, Laurent wrote:
> 
> Is there no function in the text io libraries to check which line endings are used?

Afraid not. If you're processing files from several platforms, you can check for
and trim off a CR at the end. This will work with files from either platform.

However, all bets are off if you might get a file with the old Mac CR line
terminators. I worked on a system that used the Get_Line function and dealt with
CRs as above since many of the files we processed were produced on Windows
systems. One day we got a 5-MB file saved with CRs for line terminators.
Get_Line attempted to read a 5-MB line. That was not pretty.

-- 
Jeff Carter
"Well, a gala day is enough for me. I don't think
I can handle any more."
Duck Soup
93

  reply	other threads:[~2015-12-04 23:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04 15:49 Problem with Unbounded Strings Laurent
2015-12-04 16:04 ` Dmitry A. Kazakov
2015-12-04 16:53   ` Laurent
2015-12-04 18:00     ` Niklas Holsti
2015-12-04 21:05       ` Laurent
2015-12-04 20:34     ` Dmitry A. Kazakov
2015-12-04 21:43       ` Laurent
2015-12-04 22:23         ` Dmitry A. Kazakov
2015-12-05 10:22           ` Laurent
2015-12-05 12:19             ` Dmitry A. Kazakov
2015-12-05 13:15               ` Laurent
2015-12-04 18:08 ` Jeffrey R. Carter
2015-12-04 21:21   ` Laurent
2015-12-04 21:59     ` Simon Wright
2015-12-04 23:19       ` Laurent
2015-12-04 22:02     ` Dmitry A. Kazakov
2015-12-04 22:28     ` Jeffrey R. Carter
2015-12-04 23:35       ` Laurent
2015-12-04 23:59         ` Jeffrey R. Carter [this message]
2015-12-05 10:13           ` Laurent
2015-12-08  1:53           ` Randy Brukardt
2015-12-04 23:00     ` Ben Bacarisse
replies disabled

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