| |
|
|
 | Mir fehlt, glaube Yo, una Bit (hoffentlich no sólo por una lockere Schraube verursacht) => KompilierenMarcaSeparaciónDeclare 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,
el letzte Bit uno LongInt es siempre el Vorzeichen-Bit. ¿Es gesetzt, entonces el Zahl negativo. ¿Es no gesetzt, entonces el Zahl positiv. Usted puede also por Setzten dieses Bits una Zahl negativieren oder a diesem Bit erkennen, si una Zahl negativo es. |
|
|
| |
|
|
|
 | ¡Hola Franco...
Es me klar (darauf, daß el no huntertprozentig stimmt, pfeifen wir ahora beide veces), doch wo es Bit 31 porque hin??? Mit Testbit lässt lo scheinbar no auslesen - oder Yo lo en geistiger Umnachtung sólo verlegt?
Schau dir veces el Ver código fuente oben y el Werte a y lasse el Blödsinn außer acht, el Yo en Rolands Foro Nuevo habe. Como Tuve vorher con rein positiven ULARGE_INTEGER Estructuras gerechnet y Ver código fuente basierte darauf. |
|
|
| |
|
|
|
 | Yo versuche veces mein Problema todavía algo genauer a beschreiben:
-2147483648=$80000000=%10000000000000000000000000000000 (GENERIC_READ z.B.) => Bit 31 gesetzt. Wenn Yo versuche, Bit 31 con TestBit auszulesen, son me TestBit 0 zurück. ¿Por qué??? Selbes Problema como en |???? |
|
|
| |
|
|
|
 | ¡Hola Profaner...
Das Bit va en Profano perdido. Alles wichtige dazu hier: [...]  |
|
|
| |
|
|