Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function comparaCuaternaElemento(cuaterna As Variant[], valor As Integer, n As Integer) As Boolean
- Dim a As Integer
- Dim ok As Boolean = True
- If n = 4 Then
- 'If main.activarcomprobacion = True Then
- 'Print "comprobando"
- 'Endif
- For a = 0 To cuaterna.Count - 1
- If cuaterna[a] <> valor Then
- ok = False
- Break
- Endif
- Next
- Endif
- If n = 3 Then
- If cuaterna[0] = valor And cuaterna[1] = valor And cuaterna[2] = valor Then
- ok = False
- Return ok
- Endif
- Endif
- If n = 2 Then
- If (cuaterna[0] = valor And cuaterna[1] = valor) Then
- ok = False
- Return ok
- Endif
- Endif
- Return ok
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement