Click here to Skip to main content
12,446,296 members (60,189 online)
Click here to Skip to main content

Tagged as

Stats

0 views
Posted

Conditional Operators Shortcuts

, 19 Jan 2013 CPOL
Hi,I found this:if ((value | 6 | 8 | 10) == (6 | 8 | 10) && value != 0){ size1 = value;}In this case, there's no many difference in length of your condition. If you've variables with long names, or if many options are possible, this is a shorter condition.Alternatively,...

Revisions


  

Compare Revision Minor Date Status Editor
2 - publicly available No 19-Jan-13 10:31 Available ProgramFOX
Updates in content. 2 changes had been made.
1 No 19-Jan-13 10:30 Available ProgramFOX

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

ProgramFOX
Belgium Belgium
I'm a hobbyist programmer. My favourite languages are C#, JavaScript, and Python. I also like chess; you can find me on Lichess.

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160811.3 | Last Updated 19 Jan 2013
Article Copyright 2013 by ProgramFOX
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid