Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


Tutorial The best way to toggle a boolean variable. filter_list
Author
Message
RE: The best way to toggle a boolean variable. #2
Sure, but it's not very readable... It's something that works but probably shouldn't do... like I can do a basic addition of two numbers using XOR as well...

Code:
int one = 1, two = 2;
int three = one ^ two;

but am I actually going to? And sure, you could argue that it's convenient for very long variable names but that seems like a totally contrived example because if you have super long variable names, you have another issue. But maybe it's just me. ¯\_(ツ)_/¯
(This post was last modified: 07-16-2018, 06:01 AM by reGEN.)

[+] 1 user Likes reGEN's post
Reply





Messages In This Thread
RE: The best way to toggle a boolean variable. - by reGEN - 07-16-2018, 06:00 AM



Users browsing this thread: 1 Guest(s)