Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      '// Enable only the division by zero error
      uc.Error.TrapOnDivideByZero = true
      
      '// This should now raise a uCalc error
      Console.WriteLine($"Test 1 (Div by Zero): {uc.EvalStr("1/0")}")
      
      '// This should still return 'inf' by default, as we didn't enable overflow errors
      Console.WriteLine($"Test 2 (Overflow): {uc.EvalStr("1e308 * 2")}")
      
      '// For comparison, enable overflow errors as well
      uc.Error.TrapOnOverflow = true
      Console.WriteLine($"Test 3 (Overflow with error): {uc.EvalStr("1e308 * 2")}")
   End Sub
End Module