Solved

Compiler directives

Posted on 2002-04-24
5
217 Views
Last Modified: 2010-04-04
Hello

I have an application with many units.

I Want to declare my Compiler directive (as {$DEFINE name}in Main unit and access it from any unit.

How can I do it?

Thanks



0
Comment
Question by:pmarkov
5 Comments
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 50 total points
ID: 6965503
Make a separate include file (something like Directives.INC) and include it with ($INCLUDE Directives.INC) in all your files.
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 6965521
I am fairly certain that you can't do that with a {$Define}... have you considered using a global variable, instead?




Good luck!!
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 6965540
*bows to robert_marquardt * Good show!!
0
 
LVL 1

Expert Comment

by:Alone
ID: 6965606
... or try to enter them into the "Conditional defines" line in project options dialog

WBR...
0
 

Author Comment

by:pmarkov
ID: 6967798
Alone,

What does "the "Conditional defines" line " mean?


Robert - may be this is the correct answer :))

Thanks for everybody
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question