Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jonathan Bryant <jtbryant@valdosta.edu>
To: caml-list@inria.fr
Subject: [Caml-list] Primitive sizes
Date: Wed, 29 Sep 2004 02:43:31 -0400	[thread overview]
Message-ID: <1096440210.6626.9.camel@localhost> (raw)

I would like to know the sizes of the "primitive" types in OCaml (I
assume that they vary per platform, but one can hope that they are
standard...)  If they do vary , is there any way to define new types
(similar to C typedef macro)?  I would like to create 8-, 16-, 32-, and
64-bit integers, 32- and 64-bit floats, and 16-bit characters.  I know i
could just create Int32s and Int64s and manipulate the bits ignoring the
ones I don't need, but is there a way to allocate just the necessary
memory without interfacing to C?  If not, can anyone point me in a good
direction to learn how to interface with C (by "good" I mean that a
tutorial is better/more preferable than a language specification...)?

--Jonathan Bryant
  AIM: JonBoy3182

  "The three principal virtues of a programmer are Laziness,
   Impatience, and Hubris."
	-- Perl man page

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


             reply	other threads:[~2004-09-29  6:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-29  6:43 Jonathan Bryant [this message]
2004-09-29 15:02 ` Brian Hurt
2004-09-30  6:16   ` Jonathan Bryant
2004-09-30 20:54     ` Brian Hurt
2004-10-01  9:36       ` Richard Jones

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=1096440210.6626.9.camel@localhost \
    --to=jtbryant@valdosta.edu \
    --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