document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. Public Function comparaCuaternaElemento(cuaterna As Variant[], valor As Integer, n As Integer) As Boolean
  2.  
  3.   Dim a As Integer
  4.   Dim ok As Boolean = True
  5.  
  6.   If n = 4 Then
  7.     \'If main.activarcomprobacion = True Then  
  8.     \'Print "comprobando"
  9.     \'Endif
  10.     For a = 0 To cuaterna.Count - 1
  11.       If cuaterna[a] <> valor Then
  12.        
  13.         ok = False
  14.         Break
  15.       Endif
  16.      
  17.     Next
  18.    
  19.   Endif
  20.  
  21.   If n = 3 Then
  22.     If cuaterna[0] = valor And cuaterna[1] = valor And cuaterna[2] = valor Then
  23.       ok = False
  24.       Return ok
  25.      
  26.     Endif
  27.    
  28.   Endif
  29.  
  30.   If n = 2 Then
  31.    
  32.     If (cuaterna[0] = valor And cuaterna[1] = valor) Then
  33.       ok = False
  34.       Return ok
  35.      
  36.     Endif
  37.    
  38.   Endif
  39.  
  40.   Return ok
  41.  
  42. End
');