Operator Precedence : Operator Precedence « Operator « VB.Net Tutorial






Module Module1

    Sub Main()
        Dim Expression1 As Double
        Dim Expression2 As Double
        Dim Expression3 As Double
        Dim Expression4 As Double


        Expression1 = 5 ^ 2 + 1 * 3 - 4
        Expression2 = 5 ^ (2 + 1) * 3 - 4
        Expression3 = 5 ^ (2 + 1) * (3 - 4)
        Expression4 = 5 ^ ((2 + 1) * (3 - 4))

        Console.WriteLine(Expression1)
        Console.WriteLine(Expression2)
        Console.WriteLine(Expression3)
        Console.WriteLine(Expression4)
    End Sub

End Module
24
371
-125
0.008








3.6.Operator Precedence
3.6.1.Operator Precedence