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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,807c81be80f60569 X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: put a character back to the input stream Date: 1999/10/25 Message-ID: <7v1nf4$41j$1@nnrp1.deja.com>#1/1 X-Deja-AN: 540305360 References: <3811B324.D0CC49A3@hotmail.com> X-Http-Proxy: 1.0 x40.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Oct 25 13:54:46 1999 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.6 [en] (WinNT; I) Date: 1999-10-25T00:00:00+00:00 List-Id: In article <3811B324.D0CC49A3@hotmail.com>, sy278@is9.nyu.edu wrote: > which i read a character each time > "name + 342" > when i found a digit, i know the whole thing's gonna be a number, so i > put the read digit back, then read the whole number. the same thing > happens for the string too. so i need a function to put back the > current read character back to avoid lose the first character. It sounds like you are doing lexical analysis on a stream of characters. That's exactly what OpenToken was created to do. It will handle all the minutia about reading, analyzing, and buffering characters for you. Unless this is a homework assignment, I encourage you to check it out at http://www.telepath.com/dennison/Ted/OpenToken/OpenToken.html -- T.E.D. Sent via Deja.com http://www.deja.com/ Before you buy.