From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f6a926cda2c14f4d X-Google-Attributes: gid103376,public From: "James S. Rogers" Subject: Re: nextc, getc and ungetc Date: 1999/02/03 Message-ID: <798gq5$lfr@bgtnsc02.worldnet.att.net>#1/1 X-Deja-AN: 440041993 References: <798dvo$loq$1@netra.msu.montana.edu> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: AT&T WorldNet Services Newsgroups: comp.lang.ada Date: 1999-02-03T00:00:00+00:00 List-Id: 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. >--