Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
rui7257607yArray or have meaningful variable name... it all depends on the scope of what you’re trying to accomplish
-
@rui725 well in this case a and b are just placeholder names for two variables that need to be assigned the same value so an array wouldn't really come in to play. And ideally they would have meaningful names, but that is just a contrived example.
-
rui7257607y@projektaquarius you can do just a=true and b= true or Maybe have a class that would hold those two variables and use set get method :) so you would have a = new Check{ value = true } and so on
-
Usually, for consistency the second style. I'm not opposed to a, b = true; but I don't use that nearly enough myself.
Related Rants
-
DRSDavidSoft7Linus is savage guys! Apparently, he doesn't approve of GNU style coding Source: kernel.org
-
bash-apprentice8As far as BSODs go, this one looks pretty cool.
-
babba-al-rhum6Four months ago changed a laptop failing hdd and give it back to customer. Today I got a 30 minutes call becau...
Poll time/input requested. Multiple assignments in one statement: yay or nay? For a (painfully) simple example:
a = b = true;
vs.
a = true;
b = true;
question
multiassignment
formatting
style