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

Re: 32b long int???????



Felix Kollmann wrote:

> I need a 64b number but int and long are just 32b.
> But long should be 64b.

What do you mean "long should be 64b"? ANSI C defines "long" as a 32 bit
integer. "int" is defined as a "default" size integer, which depends on
the machine word size (32 bit on i386, 16 bit on 286, 64 bit on Alpha).
There is no ANSI C 64 bit integer.

> How can I get a 64b long?

"long long" is an extension that has been known to get you a 64 bit
integer in some places...

> Perhaps:        long test[2] ?

This will definitely not work.

-- 
Pierre Phaneuf
Ludus Design, http://ludusdesign.com/
"First they ignore you. Then they laugh at you.
Then they fight you. Then you win." -- Gandhi