Solved

Conditionnal Compiling

Posted on 1998-04-27
3
132 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
  • 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

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 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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

773 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