Version française
Home     About     Download     Resources     Contact us    
Browse thread
RE: [Caml-list] Setting the EOL character....
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Bruno.Verlyck@i...
Subject: Re: [Caml-list] Setting the EOL character....
   From: "Richard Lyman" <rich@lithinos.com>
   Date: Thu, 12 Sep 2002 20:36:45 -0600

   ... so then - there's no OCaml concept of a global EOL variable, or
   method that deals with reading in from a stream until the EOL??

   I was hoping more for something along the lines of -
    myStream = Unix.accepted_socket_stream
    while(true){
	a_line = myStream.read_until("\000")
	deal_with_line(a_line)
    }
FWIW, Cash supports reading a line terminated by any char from a set
of chars.  If that's your only need, Cash may be overkill, except if
you have a performance bottleneck here: its read_line should be at
least as fast as Pervasives.read_line.  Anyway,
  http://pauillac.inria.fr/cash/

Bruno.
-------------------
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