How to set the thirtysecond bit?

Bastiaan Veelo Bastiaan at
Fri Dec 29 13:22:14 CET 2006

Thank you, Frank and others. The issue is solved, the curious may read on.

I figured that it had something to do with the sign. The prefix - is 
logical if you think of it as a number in binary notation, but I thought 
of it as a bit field. We have a large amount of legacy code that 
compiles with the Prospero Extended Pascal compiler. I do not know why 
it does, maybe that compiler is not standard compliant in this regard.

That code consists of a library that stores flags in 32-bit constants. 
Then, in many utility programmes, some of these flags are ORed together 
and stored in an integer variable (although a cardinal would have been 
more appropriate). In our case, the flag that is stored in the 32nd bit 
(the sign bit of an integer) never occurs alone, and therefore the 
hypothetical value of -0 is never attempted to be stored in the integer 
variable. Actually we do not have 32 flags, so we can just reorganise 
the bits and not use the 32rd one.

Best regards,

More information about the Gpc mailing list