Solved

Conditionnal Compiling

Posted on 1998-04-27
3
136 Views
Last Modified: 2010-04-06
Hi.
     I'm using Delphi 2.0, and I'd like to define a GLOBAL conditional symbol ({$DEFINE})... What should I do?

(Note: I already tried the Project|Options|Conditionnal Defines, and it doesn't work. I tried the /D command-line option, doesn't work either...)
0
Comment
Question by:roblam
[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
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 200 total points
ID: 1337244
Hi roblam,

Normally this should do :

{$DEFINE ROBLAMSNEEDS}

Then in your code use it like this :

{$IFDEF ROBLAMSNEEDS}
all your code
{$ENDIF}

You could also create a PAS file with all your conditional defines and then use

{$I RoblamsDefines.pas}

unit .....

Regards, ZiF.  
0
 

Author Comment

by:roblam
ID: 1337245
Thanks!!

The {$I RoblamDefines.pas} works fine.

0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1337246
My pleasure. c.u. Zif.
0

Featured Post

Technology Partners: 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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

705 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