Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Luc MAZARDO <Luc.Mazardo@cvf.fr>, caml-list@inria.fr
Subject: Re: Unsigned int ?!
Date: Mon, 19 Jun 2000 17:51:13 +0200	[thread overview]
Message-ID: <20000619175113.57076@pauillac.inria.fr> (raw)
In-Reply-To: <87pupigd8k.fsf@beepbeep.dev33.cvf>; from Luc MAZARDO on Fri, Jun 16, 2000 at 11:57:15AM +0200

> I would like to get the "caml unsigned int value" of an "unsigned int C
> value". Is there a way to do this ??
> I do the following, and it fails ...

I tried to reproduce the problem from your (incomplete) code snippet,
and everything worked fine.  If you have a complete (self-contained)
program that reproduces the problem, please send it to
caml-bugs@inria.fr.

As for the unsigned vs. signed issue, it's just two ways to view the
same bit patterns: the most significant bit of the unsigned int becomes
the sign bit of the signed int.  So, for "small enough" unsigned ints,
you will see them as the corresponding Caml int; large unsigned ints
wrap around.

- Xavier Leroy



  reply	other threads:[~2000-06-21 13:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-16  9:57 Luc MAZARDO
2000-06-19 15:51 ` Xavier Leroy [this message]
2000-06-23 16:05 ` thierry BRAVIER

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=20000619175113.57076@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=Luc.Mazardo@cvf.fr \
    --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