In Lisp how can I check stream to see if it's empty without modifying it? -


how can check if stream empty without modifying it? @ moment i'm using peek-char see if there character, appears wait user enter if nothing new in stream. also, don't know how compare eof character... #\space won't work. please?

    (loop while (equal (peek-char) '#\space)          (print 'testword)) 

you need read manual:

listen checks if there input available.

peek-char can either signal error @ eof or return eof value. can tell eof value return.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -