From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA13977; Sat, 25 Jan 2003 13:46:27 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 NAA14407 for ; Sat, 25 Jan 2003 13:46:26 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from mel-rto4.wanadoo.fr (smtp-out-4.wanadoo.fr [193.252.19.23]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h0PCkPr27418; Sat, 25 Jan 2003 13:46:25 +0100 (MET) Received: from mel-rta9.wanadoo.fr (193.252.19.69) by mel-rto4.wanadoo.fr (6.7.015) id 3E0C33FD011DAD8C; Sat, 25 Jan 2003 13:46:25 +0100 Received: from warp (193.252.171.215) by mel-rta9.wanadoo.fr (6.7.015) id 3E26DA8D00567EFF; Sat, 25 Jan 2003 13:46:25 +0100 Message-ID: <011301c2c470$50e4ac20$d7abfcc1@warp> From: "Nicolas Cannasse" To: "Damien Doligez" , References: <74C51A70-2EE3-11D7-9F00-0003930FCE12@inria.fr> Subject: Re: [Caml-list] Need unsigned int Date: Sat, 25 Jan 2003 13:50:18 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > let ui_compare x y = > > x lsr 16 < y lsr 16 || x land 0xFFFF < y land 0xFFFF > > Watch out ! This definition is wrong. > My fault ! Sometimes my keyboard is writing faster than my brain is thinking :) Someting like : let ui_compare x y = match x lsr 16 - y lsr 16 with | 0 -> x land 0xFFFF < y land 0xFFFF | n when n > 0 -> false | _ -> true Should be okay Nicolas Cannasse ------------------- 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