Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t = uc.NewTransformer() t.DefaultRuleSet.RewindOnChange = true t.FromTo("AddUp({x})", "{x}") t.FromTo("AddUp({x}, {y})", "({x} + AddUp({y}))") Console.WriteLine(t.TraceTransform("AddUp(1, 2, 3, 4)").ListFunction("$'Step {Index}: {x}"+vbCrLf+"'")) '// 0 is the default IndexBase. Here we will use 1 instead. '// So it will now start with "Step: 1" instead of "Step: 0" Console.WriteLine("--- Now with IndexBase = 1 ---") Console.WriteLine(t.TraceTransform("AddUp(1, 2, 3, 4)").ListFunction("$'Step {Index} of {Count}: {x}"+vbCrLf+"'").IndexBase(1)) End Sub End Module