From: Blady <p.p11@orange.fr>
Subject: Re: Weird behavior of Get character with trailing new lines.
Date: Mon, 25 Sep 2023 21:55:56 +0200 [thread overview]
Message-ID: <uesokd$231a1$1@dont-email.me> (raw)
In-Reply-To: <kn7mhtF58psU1@mid.individual.net>
Le 24/09/2023 à 09:50, Dmitry A. Kazakov a écrit :
> On 2023-09-23 16:03, Niklas Holsti wrote:
>> On 2023-09-23 10:02, J-P. Rosen wrote: >>> Le 22/09/2023 à 22:05, Jeffrey R.Carter a écrit :>>>> On 2023-09-22
21:30, Blady wrote:
>>>>
>>>> A.10.7 Input-Output of Characters and Strings
>>>> For an item of type Character the following procedures are provided:
>>>> procedure Get(File : in File_Type; Item : out Character);
>>>> procedure Get(Item : out Character);
>>>> After skipping any line terminators and any page terminators, reads
>>>> the next character from the specified input file and returns the
>>>> value of this character in the out parameter Item.
>>>> The exception End_Error is propagated if an attempt is made to skip
>>>> a file terminator.
Thanks all for your helpful answers.
It actually helps.
Especially, I was not aware of the particular behavior of End_Of_File
with a single line terminator before the file terminator.
In my case, I prefer to reserve exceptions for exceptional situations
:-) so I've took the code from Niklas example.
Regards, Pascal.
next prev parent reply other threads:[~2023-09-25 19:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 19:30 Weird behavior of Get character with trailing new lines Blady
2023-09-22 19:52 ` Niklas Holsti
2023-09-22 20:05 ` Jeffrey R.Carter
2023-09-23 7:02 ` J-P. Rosen
2023-09-23 8:39 ` Niklas Holsti
2023-09-23 9:25 ` Dmitry A. Kazakov
2023-09-23 14:03 ` Niklas Holsti
2023-09-24 7:50 ` Dmitry A. Kazakov
2023-09-25 19:55 ` Blady [this message]
2023-09-26 5:53 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox