r/ProgrammerHumor • • Mar 15 '22

static bool isCrazyMurderingRobot = false;

/img/2g1k34ok5kn81.jpg
4.9k Upvotes

257 comments sorted by

View all comments

Show parent comment

32

u/ksschank Mar 15 '22

ifCrazyMurderingRobot = true assigns the variable to true—the programmer meant to use == instead. = is the assignment operator; == is a comparison for equality operator.

4

u/_Sofa-King_ Mar 15 '22

oooOooooOoooo thanks!