_If Not A XOr B_ in procedure
Verfasst: 18.11.2006 23:15
ein If Not A XOr B macht komische sachen, aber nur innerhalb der procedures. die variable B wird verändert. klammerung egal.
select
case - ich bin zu müde?
case - ich bin zu blöd?
case - hier stimmt was nicht? [schon bekannt?]
select
case - ich bin zu müde?
case - ich bin zu blöd?
case - hier stimmt was nicht? [schon bekannt?]
Code: Alles auswählen
A=0
B=0
If Not A XOr B
Debug Str(A)+" "+Str(B)
Else
Debug Str(A)+" "+Str(B)
EndIf
Debug ""
;####### ausgabe : 0 0
Procedure stonedXOR_byte(A.b,B.b)
If Not A XOr B
Debug Str(A)+" "+Str(B)
Else
Debug Str(A)+" "+Str(B)
EndIf
Debug ""
EndProcedure
stonedXOR_byte(0,0)
;####### ausgabe : 0 79
; 79 entspricht 01001111
Procedure stonedXOR_long(A.l,B.l)
If Not A XOr B
Debug Str(A)+" "+Str(B)
Else
Debug Str(A)+" "+Str(B)
EndIf
Debug ""
EndProcedure
stonedXOR_long(0,0)
;####### ausgabe : 0 2088856911
; 2088856911 entspricht 01111100 10000001 01101101 01001111
Procedure stonedXOR_word(A.w,B.w)
If Not A XOr B
Debug Str(A)+" "+Str(B)
Else
Debug Str(A)+" "+Str(B)
EndIf
Debug ""
EndProcedure
stonedXOR_word(0,0)
;####### ausgabe : 0 27983
; 27983 entspricht 01101101 01001111
Procedure stonedXOR_quad(A.q,B.q)
If Not A XOr B
Debug Str(A)+" "+Str(B)
Else
Debug Str(A)+" "+Str(B)
EndIf
Debug ""
EndProcedure
stonedXOR_quad(0,0)
;####### ausgabe : 0 0