| |
|
|
| me missing, faith I, one bit (hopefully not only by a lockere screw causes) => CompileMarkSeparationDeclare LongInt1&,LongInt2&,BitCount%
Window 0,0-%MAXX,%MAXY
LET LongInt1&=+(2^31)-1
Print "LongInt-Wert von (2^31)-1=";LongInt1&
Let BitCount%=0
While Bitcount%<32
Print Bitcount%;"=";@Testbit(LongInt1&,Bitcount%)
inc Bitcount%
wend
LET LONGINT2&=0
Print ""
Print "Vor dem Setzen des Bits: ";LONGINT2&
LET LongInt2&=@Setbit(LongInt2&,31,1)
PRINT "Letztes Bit gesetzt: ";LongInt2&
Print "Bit 31=";@Testbit(LongInt2&,31)
LET LongInt2&=-(2^31)+1
Locate 0,40
Print "LongInt-Wert von -(2^31)+1=";LongInt2&
Let Bitcount%=0
While Bitcount%<32
Locate Bitcount%+2,40
Print Bitcount%;"=";@Testbit(LongInt2&,Bitcount%)
inc Bitcount%
wend
Waitinput
|
|
|
| |
|
|
|
Frank Abbing | Hi,
the latest bit one LongInt is always the omen-bit. is it staid, then is the number negative. is not staid, then is the number positively. You can means through set this Bits a number negativieren or on this bit discern, whether a number negative is. |
|
|
| |
|
|
|
| Hello Frank...
this is me clear (hereon, that the not huntertprozentig is correct, whistling we now both time), still where is bit 31 because there??? with Testbit can it itself apparently not read - or have I it in geistiger Umnachtung only redeploying?
look you time whom View source supra and the values on and let whom Blödsinn except eight, whom I in Rolands Forum posted have. there I had before with mere positive ULARGE_INTEGER Structures calculated and the View source based hereon. |
|
|
| |
|
|
|
| I try time my trouble yet something accurate To describe:
-2147483648=$80000000=%10000000000000000000000000000000 (GENERIC_READ z.B.) => bit 31 staid. If I try, bit 31 with TestBit auszulesen, gives me TestBit 0 back. Why??? Selbes trouble How with |???? |
|
|
| |
|
|
|
| Hello Profaner...
the bit goes in Profan lost. everything important moreover here: [...] |
|
|
| |
|
|