\' Gambas class file
Public Sub _new()
End
Public Sub Form_Open()
Me.Center
End
Public Sub ButtonEvalua_Click()
Dim formula As New Parser(TextBoxFormula.text)
Dim respuesta As Variant[]
respuesta = formula.evaluate()
If respuesta[0] Then
\'se ha devuelto true, ha ido bien
TextLabelResultado.text = Str$(respuesta[1])
TextLabelTextoResultado.text = "Resultado: ok, he podido analizarlo"
Else
TextLabelTextoResultado.text = "Resultado: fallo, error encontrado"
TextLabelResultado.text = respuesta[2]
Endif
End