I'm currently going through the Dynamics AX 2012 X++ developer E-learning and have a question about the X++ language that is not obvious from the documentation.
In one place it says that x++
and ++x
are exactly the same. However it also has this statement where it talks about operator precedence:
postfix operators [] . ( params ) expr ++ expr --
unary operators ++ expr -- expr + expr - expr ~ !
So are they equivalent except for operator precedence or am I misunderstanding something?
Or does the fact that ++/-- are only used in statements and not expressions render all of this completely irrelevant?
According to X++ documentation. The "++" operator can only be used as a statement. This restriction effectively trumps any operator precedence rules. My interpretation is that the "++" operator was included in the X++ precedence documentation for completeness.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With