marvy
Gebruiker
- Lid geworden
- 25 dec 2000
- Berichten
- 396
Hallo, Kan er iemand de Do While (value And 1) = 0 uitleggen van het volgend stukje?
Module Example2
Sub Main()
Dim value As Integer
Dim position As Integer
Dim counter As Integer
Dim start As Integer
'
value = 12
position = 1
Do While (value And 1) = 0
value >>= 1
position += 1
Loop
Console.WriteLine("12 : Bit at position " & position & _
" from the right is 1.")
Console.ReadLine()
End Sub
End Module
Module Example2
Sub Main()
Dim value As Integer
Dim position As Integer
Dim counter As Integer
Dim start As Integer
'
value = 12
position = 1
Do While (value And 1) = 0
value >>= 1
position += 1
Loop
Console.WriteLine("12 : Bit at position " & position & _
" from the right is 1.")
Console.ReadLine()
End Sub
End Module