From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Problem with Unbounded Strings
Date: Fri, 4 Dec 2015 15:28:42 -0700
Date: 2015-12-04T15:28:42-07:00 [thread overview]
Message-ID: <n3t3u8$fmk$1@dont-email.me> (raw)
In-Reply-To: <274dc49b-b7cd-4eef-b333-34bae665c992@googlegroups.com>
On 12/04/2015 02:21 PM, Laurent wrote:
>
> 1st read: 0123456789
> append to the buffer which is empty so content of buffer is: 0123456789
>
> 2nd read: abcdefghijklmnopqrstuvwxyz
> append to buffer so it becomes: 0123456789abcdefghijklmnopqrstuvwxyz
>
> 3rd read: ABCDEFGHIJKLMNOPQRSTUVWXYZ
> append to buffer so it would be: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
This is what your code does for me, compiled with GNAT 4.9.2 under Linux Mint
Debian Edition.
One possible explanation is that your file was produced by a Windows system, and
you're running your program on a Unix-based platform. In that case, Get_Line
will return a string with a CR at the end. When displayed, the CR will return
the cursor to the beginning of the line. So you begin by outputting
Buffer after append: 0123456789
You then output the CR, and the cursor returns to the beginning of the line.
Then you output
abcdefghijklmnopqrstuvwxyz
which overwrites everything already displayed through the '4'.
--
Jeff Carter
"Well, a gala day is enough for me. I don't think
I can handle any more."
Duck Soup
93
next prev parent reply other threads:[~2015-12-04 22:28 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 [this message]
2015-12-04 23:35 ` Laurent
2015-12-04 23:59 ` Jeffrey R. Carter
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