Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] unread_char function
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-09-29 (18:45)
From: Basile Starynkevitch <basile.starynkevitch@i...>
Subject: Re: [Caml-list] unread_char function
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 - phone +33 1 3963 5197 - mobile 6 8501 2359 --- all opinions are only mine 

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: