caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Bauer, Robert" <rbauer@rational.com>
To: caml-list@inria.fr
Subject: [Caml-list] re: help with ocaml
Date: Thu, 28 Jun 2001 09:00:23 -0700	[thread overview]
Message-ID: <A3AF185A9D48B3489F7CD9FE0F6E63A0DCC78C@sus-ca3it10> (raw)

Hi,

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 =
 object
  val mutable l:bool = left
  val mutable r:bool = right

  method get_l = l
  method get_r = r
end;;

let top_def = new lattice_point false false;;

Thanks.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


             reply	other threads:[~2001-06-28 15:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-28 16:00 Bauer, Robert [this message]
2001-06-29  7:10 ` Jean-Christophe Filliatre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A3AF185A9D48B3489F7CD9FE0F6E63A0DCC78C@sus-ca3it10 \
    --to=rbauer@rational.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).