Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// Goal: Define a new power operator '**' with higher precedence than multiplication '*'. Dim mul_precedence = uc.ItemOf("*", uCalc.Properties(ItemIs.Infix)).Precedence '// Set the new operator's precedence to be higher than multiplication. uc.DefineOperator("{base} ** {exp} = Pow(base, exp)", mul_precedence + 10) '// The new operator should be evaluated before multiplication and addition. '// The expression is equivalent to: 2 + (3 * (2 ** 3)) -> 2 + (3 * 8) -> 2 + 24 -> 26 Console.WriteLine(uc.Eval("2 + 3 * 2 ** 3")) End Sub End Module