groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] integer size


From: Larry Jones
Subject: Re: [Groff] integer size
Date: Tue, 30 Oct 2001 16:26:11 -0500 (EST)

Bernd Warken writes:
>
> I use the following clutch to optimize memory usage.
> 
> # define INTEGER_LENGTH (32 / 8)
> # if sizeof(int) >= INTEGER_LENGTH
>   typedef int Integer;
> # else
>   typedef long int Integer;
> # endif

As was mentioned before, you can't use sizeof in preprocessor
expressions.

I don't know of any 32-bit systems where long is longer than 32 bits,
only 64-bit systems.  And 64-bit systems are likely to have more memory
than you'll know what to do with, anyway, so like I said before, if you
need more than 32 bits, just use long and be done with it.

-Larry Jones

Is it too much to ask for an occasional token gesture of appreciation?!
-- Calvin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]