Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Apr 26th, 2006, 3:31 PM   #1
JawaKing00
Newbie
 
Join Date: Sep 2004
Posts: 29
Rep Power: 0 JawaKing00 is on a distinguished road
Multiple conditions in an #ifdef statement

I'm trying to add some test code to a previously written program, and I wanted it to be seperated from the rest of the code using #ifdefs so I can easily disable it. There are multiple test cases, but some of the test code is used for multiple tests.

Basically what I have is this:
#ifdef TEST_1
// do stuff
#endif

#ifdef TEST_2
// do stuff
#endif

#ifdef TEST_3
// do stuff
#endif

And what I want is
#ifdef TEST_1 OR TEST_2 OR TEST_3
// do stuff
#endif

Is that possible to do?

Thanks
JawaKing00 is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:11 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC