Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      '// 1. Define the account balance variable
      uc.DefineVariable("balance = 100.0")
      
      '// 2. Get the expression transformer and define a single rule
      Dim t = uc.ExpressionTransformer
      t.FromTo("DEPOSIT {@Number:amount}", "balance = balance + {amount}")
      
      '// 3. Process a single-line script.
      '// This gets transformed to "balance = balance + 500" and executed.
      uc.EvalStr("DEPOSIT 500")
      
      '// 4. Print the final balance
      Console.WriteLine($"Final Balance: {uc.EvalStr("balance")}")
   End Sub
End Module