Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] Primitive sizes
@ 2004-09-29  6:43 Jonathan Bryant
  2004-09-29 15:02 ` Brian Hurt
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Bryant @ 2004-09-29  6:43 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-10-01  9:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-29  6:43 [Caml-list] Primitive sizes Jonathan Bryant
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox