?
Solved

Compiler directives

Posted on 2002-04-24
5
Medium Priority
?
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 150 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month13 days, 14 hours left to enroll

800 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