
19/05/2005, 07:44
|
| | Fecha de Ingreso: marzo-2005
Mensajes: 1.418
Antigüedad: 20 años, 1 mes Puntos: 9 | |
Claro, disculpen que no puse para que servia, es justamente lo que dice Trasgukabi.
Y alguien sabe para que sirve utilizar el operador AND de esta forma:
Public Function EncodeStr(byVal strIn)
Dim c1, c2, c3, w1, w2, w3, w4, n, strOut
For n = 1 To Len(strIn) Step 3
c1 = Asc(Mid(strIn, n, 1))
c2 = Asc(Mid(strIn, n + 1, 1) + Chr(0))
c3 = Asc(Mid(strIn, n + 2, 1) + Chr(0))
w1 = Int(c1 / 4) : w2 = (c1 And 3) * 16 + Int(c2 / 16)
If Len(strIn) >= n + 1 Then
w3 = (c2 And 15) * 4 + Int(c3 / 64)
Else
w3 = -1
End If
If Len(strIn) >= n + 2 Then
w4 = c3 And 63
Else
w4 = -1
End If
Y tambien hay veces que utiliza el OR y el XOR. Busque en google, pero me sale cualquier resultado, y en los tutoriales que comunmente se encuentran en la red no mencionan este uso de AND.
Saludos. |