danmc
Community Member
Offline
Posts: 35
Boston
|
Is there a way to check multiple macros with an `ifdef? What I would like is:
`define CASE1 // `define CASE2 // `define CASE3
// what I want to do next is `if defined(CASE1) || defined(CASE2) // do something `endif
obviously the defined() bit isn't valid, but is there some easy way of doing this? I suppose I could do: `ifdef CASE1 `define CASE1_OR_2 `endif
`ifdef CASE2 `define CASE1_OR_2 `endif
`ifdef CASE1_OR_2 //do stuff `endif
but that seems like an ugly solution. Is there a nicer way?
Thanks -Dan
|