caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* 32-bit integer operations
@ 2001-01-07  4:20 Chet Murthy
  2001-01-07 20:51 ` Gerd Stolpmann
  0 siblings, 1 reply; 2+ messages in thread
From: Chet Murthy @ 2001-01-07  4:20 UTC (permalink / raw)
  To: caml-list


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.

In the absence of such indications, I guess I'll just code one up.

Cheers,
--chet--



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

* Re: 32-bit integer operations
  2001-01-07  4:20 32-bit integer operations Chet Murthy
@ 2001-01-07 20:51 ` Gerd Stolpmann
  0 siblings, 0 replies; 2+ messages in thread
From: Gerd Stolpmann @ 2001-01-07 20:51 UTC (permalink / raw)
  To: Chet Murthy, caml-list

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
-- 
----------------------------------------------------------------------------
Gerd Stolpmann      Telefon: +49 6151 997705 (privat)
Viktoriastr. 100             
64293 Darmstadt     EMail:   gerd@gerd-stolpmann.de
Germany                     
----------------------------------------------------------------------------



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

end of thread, other threads:[~2001-01-07 21:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-07  4:20 32-bit integer operations Chet Murthy
2001-01-07 20:51 ` Gerd Stolpmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).