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] re: help with ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-06-28 (15:54)
From: Bauer, Robert <rbauer@r...>
Subject: [Caml-list] re: help with ocaml

I have a little definition below written in ocaml.  My problem is that when
I define the class
lattice_point, I would have liked to specify the types of the parameters;
however, when I do so
I get an error - instead, I have to specify the types of the class's
attributes.  I am hoping that
someone can shed some light on this.

Also, I find that if try to use any capitalized variables, I get interesting
errors - for
example if I try let XYZ_ZYX = (false, false);; I get an error, whereas let
xyz_zyx = (false, false);;
works just fine. Or more simply, let XYZ = (false, false);; fails.  Again, I
am hoping for an explanation.

class lattice_point left right =
  val mutable l:bool = left
  val mutable r:bool = right

  method get_l = l
  method get_r = r

let top_def = new lattice_point false false;;

Bug reports:  FAQ:
To unsubscribe, mail  Archives: