From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: questions on input/output
Date: Sat, 6 Feb 2021 00:36:25 +0100 [thread overview]
Message-ID: <rvkkpq$7tf$1@dont-email.me> (raw)
In-Reply-To: <fb923aff-5068-45a9-a714-ea7df45d8437n@googlegroups.com>
On 2/5/21 11:50 PM, Mehdi Saada wrote:
> I can't understand how input/output works.
> 1) on text files - not keyboard input - what's the difference between get_immediate and get ?
Get_Immediate might behave differently at a line terminator.
> 2) what means "consumming" characters, if indices don't change ?
It is usually best to only use Get_Immediate with Standard_Input, and to ignore
the column, line, and page counting and setting operations.
> 3) can set_col be used or not, to go back in a line in an IN_FILE file ?
You cannot go back in a text file. Only Direct_IO and Stream_IO support this.
> I need: to read a character, until some marker, then go back (set_col(stored_position)) and read again but store it like Get(variable, FILE); then go past the marker (set_col(FILE,col(file)+1)).
You will probably want to store the characters that you read in a string and
obtain the value from it.
--
Jeff Carter
"I wave my private parts at your aunties."
Monty Python & the Holy Grail
13
next prev parent reply other threads:[~2021-02-05 23:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-05 22:50 questions on input/output Mehdi Saada
2021-02-05 23:36 ` Jeffrey R. Carter [this message]
2021-02-06 0:59 ` Mehdi Saada
2021-02-06 1:34 ` Mehdi Saada
2021-02-06 2:13 ` Paul Rubin
2021-02-06 7:21 ` J-P. Rosen
2021-02-06 9:36 ` Dmitry A. Kazakov
2021-02-06 10:38 ` AdaMagica
2021-02-06 11:37 ` Mehdi Saada
2021-02-06 11:51 ` Mehdi Saada
2021-02-06 18:10 ` Paul Rubin
2021-02-06 18:55 ` Mehdi Saada
2021-02-06 20:26 ` Paul Rubin
2021-02-07 8:52 ` Mehdi Saada
2021-02-07 20:38 ` Paul Rubin
2021-02-07 9:55 ` Gautier write-only address
2021-02-07 22:54 ` Mehdi Saada
2021-02-06 11:47 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox