From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA15900 for caml-red; Wed, 21 Jun 2000 15:18:01 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA00316 for ; Mon, 19 Jun 2000 17:51:19 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e5JFpEL10393; Mon, 19 Jun 2000 17:51:14 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA01757; Mon, 19 Jun 2000 17:51:13 +0200 (MET DST) Message-ID: <20000619175113.57076@pauillac.inria.fr> Date: Mon, 19 Jun 2000 17:51:13 +0200 From: Xavier Leroy To: Luc MAZARDO , caml-list@inria.fr Subject: Re: Unsigned int ?! References: <87pupigd8k.fsf@beepbeep.dev33.cvf> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1 In-Reply-To: <87pupigd8k.fsf@beepbeep.dev33.cvf>; from Luc MAZARDO on Fri, Jun 16, 2000 at 11:57:15AM +0200 Sender: weis@pauillac.inria.fr > 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