Raised This Month: $ Target: $400
 0% 

Do variable equal to each of these numbers?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 04-16-2012 , 13:25   Do variable equal to each of these numbers?
Reply With Quote #1

Hey guys,

If I want to check if a variable equal to 1 of for example 10 numbers, I think doing:

if ( var == 5 || var == 6 || var == 7 ..... )
because then it would be hell long, and if I needed to check 50 numbers?

so... I was wondering. Is it possible to do:

new var = ( 1 | 2 | 3 )

if ( 2 & var )

or something like that?
help me out here :X
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive
Diegorkable is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:48.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode