Solved

Compiler directives

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

759 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now