Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// Trigger a syntax error uc.EvalStr("1 +") '// Check the error state after the fact If uc.Error.Code <> ErrorCode.None Then Console.WriteLine($"Error detected: {uc.Error.Message}") Else Console.WriteLine("Success!") End If '// Perform a successful operation, which clears the error state uc.EvalStr("1 + 1") If uc.Error.Code = ErrorCode.None Then Console.WriteLine("Previous error was cleared by successful operation.") End If End Sub End Module