Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

conditional ifdef for multiple projects ?

Status
Not open for further replies.

bobjee

Newbie level 5
Joined
Jun 2, 2009
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,337
Hello All,

Can some one please help me with this issue.
I have 3 different projects A1, A2, A3 and i am using ifdefs. Can someone tell me a way to avoid such scenario

ifdef A1
<code1>
elsif A2
<code2>
elseif A3
<code3>
endif

code1 and code2 are same, i dont want to use ifndef . So can someone suggest me a mechanism which looks like (the reason i dont want to use ifndef is if a new project comes up I have to change my logic again, i cant use shared code logic)

ifdef (A1 or A2)
<code>
elseif A3
<code3>
endif

Please help me with this issue.
Thank you
 

Thank you for the reply, but I want to get this done without adding new defines like A4.. Thank you
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top