document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. \' Gambas class file
  2.  
  3. Public Sub _new()
  4.  
  5. End
  6.  
  7. Public Sub Form_Open()
  8.  
  9.   Me.Center
  10.  
  11. End
  12.  
  13. Public Sub ButtonEvalua_Click()
  14.  
  15.   Dim formula As New Parser(TextBoxFormula.text)
  16.  
  17.   Dim respuesta As Variant[]
  18.  
  19.   respuesta = formula.evaluate()
  20.  
  21.   If respuesta[0] Then
  22.     \'se ha devuelto true, ha ido bien
  23.     TextLabelResultado.text = Str$(respuesta[1])
  24.     TextLabelTextoResultado.text = "Resultado: ok, he podido analizarlo"
  25.   Else
  26.     TextLabelTextoResultado.text = "Resultado: fallo, error encontrado"
  27.     TextLabelResultado.text = respuesta[2]
  28.    
  29.   Endif
  30.  
  31. End
');