Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      '// Rule 1: Format Doubles as currency with two decimal places.
      Dim doubleType = uc.DataTypeOf(BuiltInType.Float_Double)
      uc.Format("Result = '$' + Format('{:.2f}', double(Result))", doubleType)
      
      '// Rule 2: Center-align strings in a 15-character field padded with '-'.
      Dim strType = uc.DataTypeOf(BuiltInType.String)
      uc.Format("Result = Format('{:-^15}', Result)", strType)
      
      Console.WriteLine($"Price: {uc.EvalStr("199.999")}")
      Console.WriteLine($"Discount: {uc.EvalStr("7.5")}")
      Console.WriteLine($"Label: {uc.EvalStr("'Summary'")}")
   End Sub
End Module