Mike,
This are question which completely depends on the knowledge of the users.
Some say parentheses make it easier to read, others say you would not put
things in code without a function, because then others become suspicious and
take time in it to examine why you did it and when they cannot find it, take
even more time.
However, personally I do it too, because I am simply to lazy to reminds me
what goes first especially in a not situation.
But to say that it is better, like I wrote, it is mainly because I'm lazy.
jmo
Cor
"Mike Ratcliffe" <(E-Mail Removed)> wrote in message
news:1693dfce-1557-4369-889c-(E-Mail Removed)...
> We have been having a lively debate at work about whether or not we
> should use brackets with conditionals that contain AndAlso. This is
> because AndAlso has precedence over OrElse and I say that it makes
> code more manageable if brackets are included.
>
> False OrElse True AndAlso False will return False because AndAlso has
> precedence over OrElse.
>
> I say that this is better written as:
> False OrElse (True AndAlso False)
>
> What do you think?
|