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
-
Wack63118y@linuxer4fun probably because there's only one `=` which get's interpreted as assignment. In most languages to compare you have to use `==`. There are some (like PHP) which even use `===` for a comparisation with type checking.
In mathematics (and a few languages) you use `:=` for assignment and `=` for comparision (<-- is that a proper english word?) -
GreenHat1258yYeah, with only one = you say assign isCrazyRobot true, and because there is no further comparison, the whole statement is true
-
Rabb6798yAnd that static bool means it applies to all the robots not just one instance of a robot
-
matanl26478y@Rabb static in C for a global variable means it's not visible in other c files nor in the header (if I remember correctly, static keyword is said to be the most confusing one in C,C++)
Related Rants
Haha!!
undefined
humour