comp.lang.ada
 help / color / mirror / Atom feed
From: "E. Robert Tisdale" <edwin@netwood.net>
Subject: Re: Conditional Compilation
Date: 2000/09/19
Date: 2000-09-19T00:00:00+00:00	[thread overview]
Message-ID: <39C7C748.4A533989@netwood.net> (raw)
In-Reply-To: 7FEFA9E5E3B3C4A5.90418F4BE7D5AE58.48E094CF81EC6BD3@lp.airnews.net

Kenneth Kueny wrote:

> Does ADA have an analog to the C language #define, #ifdef constructs
> commonly used to include or exclude certain blocks of code
> in different code versions?

This is a bit confusing.
The C macro preprocessor wasn't originally part
of the C computer programming language.
It was, and still is, a separate program
which accepted a C program "source file"
and emitted a C program "translation unit".
The typical C compiler accepts a translation unit
and compiles it into assembly language code
then calls the assembler to generate machine code.
The ANSI/ISO C/C++ standards now specify
syntax and semantics for the C macro preprocessor
but you can still use the C macro preprocessor
on Ada source files as long as the translation unit
is an acceptable Ada program.
Try it.  It works.

Now, professional programmers almost never write
programs in Ada, C, C++ or any other standard
computer programming language directly.
They usually use perl, the m4 macro preprocessor,
the sed stream editor or some combination of tools
to write programs for them from "prototype files"
which they maintain instead of source files.
Of course, if you are distributing "open source" programs,
you will need to distribute the prototype files
and any special tools along with the source files
so that other programmers can help to maintain
an contribute to the prototype files as well.





  reply	other threads:[~2000-09-19  0:00 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-19  0:00 Conditional Compilation Kenneth Kueny
2000-09-19  0:00 ` E. Robert Tisdale [this message]
2000-09-19  0:00   ` David Starner
2000-09-20  0:52     ` Robert Dewar
2000-09-19  0:00   ` Larry Kilgallen
2000-09-19  0:00     ` Jeff Allen
2000-09-20  0:49       ` Robert Dewar
2000-09-19  0:00         ` Bobby D. Bryant
2000-09-24  0:00           ` Robert Dewar
2000-09-20  0:47   ` Robert Dewar
2000-10-09  0:00   ` John McCabe
2000-09-19  0:00 ` David Starner
2000-09-19  0:00 ` Richard Riehle
2000-09-19  0:00 ` Ted Dennison
2000-09-19  0:00 ` Jeffrey Carter
2000-09-19  0:00   ` Samuel T. Harris
2000-09-20  0:44     ` Robert Dewar
2000-09-20  1:33 ` tmoran
     [not found]   ` <8qauu3$7ei$1@nnrp1.deja.com>
2000-09-24  0:00     ` Robert Dewar
2000-09-25  2:45       ` Ted Dennison
2000-09-25  0:00         ` peter
     [not found] ` <39CA31F2.E160F0D8@res.raytheon.com>
2000-09-24  0:00   ` Robert Dewar
2001-01-02 13:27 ` Andrew Hately
2001-01-02 16:46   ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
2000-07-31  0:00 conditional compilation Matthew Woodcraft
2000-07-31  0:00 ` Marin D. Condic
2000-07-31  0:00   ` Ira D. Baxter
2000-08-01  0:00   ` Simon Brady
2000-07-31  0:00     ` Marin D. Condic
2000-08-01  0:00     ` Ted Dennison
2000-08-01  0:00       ` Robert A Duff
2000-08-01  0:00         ` Laurent Guerby
2000-08-02  0:00       ` Simon Brady
2000-08-02  0:00         ` Georg Bauhaus
2000-08-02  0:00         ` Robert A Duff
2000-08-02  0:00           ` Brian Rogoff
2000-08-03  0:00             ` Robert A Duff
2000-08-02  0:00           ` Georg Bauhaus
2000-08-03  0:00             ` Robert A Duff
2000-08-03  0:00           ` Florian Weimer
2000-08-02  0:00         ` Simon Brady
2000-08-01  0:00           ` William J. Thomas
1989-12-12  0:08 Emery
1988-06-13  0:24 Conditional compilation Steinar Haug
1988-06-17 13:53 ` rds
1988-06-22  0:44   ` Jeff Bartlett
1988-06-23 13:01   ` Arny B. Engelson
1988-06-27 18:01     ` Dave Seward
1988-06-29 13:32   ` brucej
1988-06-17 14:48 ` rjs
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox