Solved

Compiler directives

Posted on 2002-04-24
5
219 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

860 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