English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
32-bit integer operations
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-01-07 (21:30)
From: Gerd Stolpmann <gerd@g...>
Subject: Re: 32-bit integer operations
On Sun, 07 Jan 2001, Chet Murthy wrote:
>Hmmm ..... perhaps I've lost my mind.
>I decided to use 32-bit integers (int32) for some operations in a
>program today, and I was about to code something which required me to
>do a comparison between two of them, and ... I can't figure out how to
>do it.
>That is, there isn't any comparison operator defined.  I suppose I
>could code one up, using various primitives, but I figured I'd point
>this out, in the hope that somebody could slap me upside the head and
>point me at the officially-blessed way of doing this.

Simply use <, <=, >, >=, =, <>. They work perferctly for int32 (as for all core
types of the language).

Gerd Stolpmann      Telefon: +49 6151 997705 (privat)
Viktoriastr. 100             
64293 Darmstadt     EMail:   gerd@gerd-stolpmann.de