caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Basile Starynkevitch <basile.starynkevitch@inria.fr>
To: Miles Egan <miles@caddr.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] unread_char function
Date: Mon, 29 Sep 2003 20:44:57 +0200	[thread overview]
Message-ID: <20030929184457.GA31008@bourg.inria.fr> (raw)
In-Reply-To: <1064850132.1704.3.camel@car>

On Mon, Sep 29, 2003 at 08:42:13AM -0700, Miles Egan wrote:
> I need an "unread_char" function to go along with the input_char
> function for a tool I'm writing in OCaml, but I can't seem to find one
> in OCaml 3.07beta.  

Perhaps you might want to use streams? They provide some form of lookahead
(by factorising common prefixes).

Ungetting functions might be not always possible in general (i.e.
considering reading from a raw serial line, or a raw network...).

-- 
Basile STARYNKEVITCH -- basile dot starynkevitch at inria dot fr
Project cristal.inria.fr - phone +33 1 3963 5197 - mobile 6 8501 2359
http://cristal.inria.fr/~starynke --- all opinions are only mine 

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2003-09-29 18:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-29 15:42 Miles Egan
2003-09-29 18:44 ` Basile Starynkevitch [this message]
2003-09-29 21:10   ` Pierre Weis
2003-09-29 22:42     ` Miles Egan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030929184457.GA31008@bourg.inria.fr \
    --to=basile.starynkevitch@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=miles@caddr.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).