comp.lang.ada
 help / color / mirror / Atom feed
From: "James S. Rogers" <jimmaureenrogers@worldnet.att.net>
Subject: Re: nextc, getc and ungetc
Date: 1999/02/03
Date: 1999-02-03T00:00:00+00:00	[thread overview]
Message-ID: <798gq5$lfr@bgtnsc02.worldnet.att.net> (raw)
In-Reply-To: 798dvo$loq$1@netra.msu.montana.edu

There is no equivalent to ungetc in the Ada.Text_IO package.
The equivalent to getc is the get procedure for type character.
The way you read the next character without advancing the file pointer
is the procedure Look_Ahead.

Jim Rogers
Colorado Springs, Colorado

Jeremy D. Mullin wrote in message <798dvo$loq$1@netra.msu.montana.edu>...
> I am writing a scanner in Ada and was wondering if there was a "peek"
>function I could use to get a char from the input file but not move the
>file pointer. I found definitions for nextc, getc and ungetc in the
>text_io package but they are private declarations.
> Does anyone know of the package/methods I should be using or of any
>resources on the web that might help me?
>
> TIA,
>  J.D.
>--






      parent reply	other threads:[~1999-02-03  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-03  0:00 nextc, getc and ungetc Jeremy D. Mullin
1999-02-03  0:00 ` dennison
1999-02-03  0:00 ` James S. Rogers [this message]
replies disabled

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