Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      '// Practical (Real World)
      '// Parse an expression
      Dim myExpr = uc.Parse("5 + 4")
      Console.WriteLine($"Initial evaluation: {myExpr.Evaluate()}")
      
      '// Retrieve the parent uCalc instance from the expression object
      Dim parentUc = myExpr.uCalc
      
      '// Use the parent instance to add a new formatting rule
      parentUc.Format("Result = 'Answer = ' + Result")
      
      '// The new format is now active for this expression's context
      Console.WriteLine($"Formatted evaluation: {myExpr.EvaluateStr()}")
   End Sub
End Module