help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About `read'


From: Barry Margolin
Subject: Re: About `read'
Date: Fri, 04 Jan 2013 11:07:54 -0500
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <mailman.16693.1357308229.855.help-gnu-emacs@gnu.org>,
 Xue Fuqiao <xfq.free@gmail.com> wrote:

> On Fri, 04 Jan 2013 15:44:16 +0200
> Teemu Likonen <tlikonen@iki.fi> wrote:
> 
> > Function READ reads one Lisp expression. In your first example the first
> > expression is a list of two symbols. In the second example the first
> > expression is symbol named "I".
> Thanks, I see.
> 
> >      a function (call it with no arguments for each character,
> >          call it with a char as argument to push a char back)
> When STREAM is a function called with one argument, what does `push a char 
> back' mean?  Where will the char be pushed?

Read often has to check an extra character beyond the representation of 
an object, to detect a delimiter.  Since this character isn't actually 
part of the object, it has to be made available to the next caller. So 
read calls the function again, to "unread" the character.

Where it gets pushed is up to the design of the function.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

[Prev in Thread] Current Thread [Next in Thread]