Nп/п : 61 из 100
 От   : Blady                               2:5075/128        25 сен 23 21:55:56
 К    : Niklas Holsti                                         25 сен 23 22:57:02
 Тема : Re: Weird behavior of Get character with trailing new lines.
----------------------------------------------------------------------------------
                                                                                 
@MSGID: 1@dont-email.me> c16519c3
@REPLY: <kn7mhtF58psU1@mid.individual.net>
5d1cec91
@REPLYADDR Blady <p.p11@orange.fr>
@REPLYTO 2:5075/128 Blady
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID: 1@dont-email.me>
@RFC-References: 1@dont-email.me>
1@dont-email.me> 1@dont-email.me> <kn7mhtF58psU1@mid.individual.net>
@TZUTC: 0200
@PID: Mozilla/5.0 (Macintosh; Intel Mac OS X
10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1
@TID: FIDOGATE-5.12-ge4e8b94
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.

 --- Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.15.1
 * Origin: A noiseless patient Spider (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх