Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Bug value
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Warp <warplayer@f...>
Subject: [Caml-list] Bug value
Is the following code :

let read_fdata file =
 let id = (input_value file : fid) in
 let infos = (input_value file : finfos) in
 {
  id = id;
  infos = infos;
  childs = clist;
  deps = dlist;
 }

equivalent to :

let read_fdata file =
 {
  id = (input_value file : fid);
  infos = (input_value file : finfos);
 }

?
Because the first one got no problem while the second one is causing a fatal
bug at run-time when I try to access the struct

PS :
-----
type fid = int
type fver = int
type ftype = int
type finfos = {
 mutable name : string;
 mutable parent : fid;
 mutable ver : fver;
 mutable t : ftype;
}

Warp

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