I am just curious to know.
I already know the operator precedence in Visual Basic.NET and it is easy to find a reference about it anyway.
What I do NOT know is the precedence of built-in functions related to the operators and maybe any priority difference between them, if there is any precedence for them whatsoever.
I mean are built-in functions executed with priority higher than parentheses and everything, are they in a certain priority point or do we consider them being at the bottom and just execute before being used by an operator?
Does the priority of execution varies according to the function? Here are some built in functions I am interested in.
Abs()
Cos()
Exp()
Pow()
Sqrt()
Max()
CInt()
CLng()
CStr()
CDbl()
There is no "precedence". Any functions, inline or not, are executed exactly when you would expect. Any expression used as an argument to a function must be evaluated before the function can be executed and the function must be executed before its result can be used. It's that simple.
Think about it. You're implying that it might be the case that this code:
x = a + CInt(b)
could possibly evaluated by a
being added to b
before the CInt
call is executed. How could that possibly make sense?