Correct. For "good style", however, you shouldn't even set the variable values there.
I think that is a special case, where a variable is used as if it were a constant (but dependent on...) and so I would say that way can be acceptable... as exception.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.