Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Conditionnal Compiling

Posted on 1998-04-27
3
Medium Priority
?
138 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 800 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

609 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