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
beginners list
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-02-25 (01:09)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] beginners list
On Saturday 24 February 2007 18:43, christian konrad wrote:
> (Scanf.sscanf line "%d\t%d\t%d\t%d" createErgebnis) ::
> (readErgebnisse fh (number-1)); 

I think you've made exactly the same mistake here. Also, the outer brackets 
are superfluous. You probably want:

  let line = Scanf.sscanf line "%d\t%d\t%d\t%d" createErgebnis in
  line :: readErgebnisse fh (number-1)

but it depends whether you wanted to recurse first or read a line first (I 
can't tell from your code and neither can the compiler).

Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists