comp.lang.ada
 help / color / mirror / Atom feed
From: kilgallen@eisner.decus.org (Larry Kilgallen)
Subject: Re: PRECOMPILATION
Date: 1999/02/09
Date: 1999-02-09T00:00:00+00:00	[thread overview]
Message-ID: <1999Feb9.081125.1@eisner> (raw)
In-Reply-To: 918556681.260459@dedale.pandemonium.fr

In article <918556681.260459@dedale.pandemonium.fr>, "=:-) Vincent" <vb@bruker.fr> writes:
> Are there precompilation instructions in Ada95,
> like in C (#ifdef,...etc) ? In other words, how can
> I set compilation conditions ?

Conditional compilation is explicitly omitted from Ada to avoid
a host of problems (not the least of which is readability issues).

For situations where you would use the C preprocessor to set varying
bounds, a small package declaring the current values is appropriate.
At compile-time you can substitute a different rendition of that
package which has different limits.

One strange case often handled by the C preprocessor is the definition
of named constants.  If this is your interest, take a look at Ada
enumerated types.

The piece of Ada which most closely matches C "macros" would be
Ada "generics".  At a rough level, you can first think of them
as "macros with type checking".  There are certainly (unsafe)
thinks you can do with C macros that are not possible with Ada
generics, but then again C macros are a crude shadow of the
macro capabilities of a language like Bliss.

Larry Kilgallen




  reply	other threads:[~1999-02-09  0:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-09  0:00 PRECOMPILATION =:-) Vincent
1999-02-09  0:00 ` Larry Kilgallen [this message]
1999-02-09  0:00   ` PRECOMPILATION Pascal MALAISE
1999-02-09  0:00     ` PRECOMPILATION Tom Moran
1999-02-10  0:00       ` PRECOMPILATION Pascal MALAISE
1999-02-10  0:00         ` PRECOMPILATION Tom Moran
1999-02-11  0:00           ` PRECOMPILATION Pascal MALAISE
1999-02-12  0:00             ` PRECOMPILATION robert_dewar
1999-02-14  0:00               ` PRECOMPILATION Pascal MALAISE
1999-02-09  0:00     ` PRECOMPILATION Tucker Taft
1999-02-09  0:00     ` PRECOMPILATION Tom Moran
1999-02-10  0:00       ` PRECOMPILATION robert_dewar
1999-02-10  0:00       ` PRECOMPILATION Corey Ashford
1999-02-10  0:00       ` PRECOMPILATION dennison
1999-02-09  0:00 ` PRECOMPILATION Marin David Condic
1999-02-09  0:00 ` PRECOMPILATION Tom Moran
1999-02-10  0:00   ` PRECOMPILATION Pascal MALAISE
1999-02-10  0:00     ` PRECOMPILATION Tom Moran
1999-02-09  0:00 ` PRECOMPILATION Tucker Taft
1999-02-10  0:00   ` PRECOMPILATION Fraser Wilson
1999-02-18  0:00   ` PRECOMPILATION Samuel Mize
1999-02-18  0:00     ` PRECOMPILATION robert_dewar
1999-02-18  0:00     ` PRECOMPILATION Rakesh Malhotra
1999-02-19  0:00       ` PRECOMPILATION Samuel Mize
1999-02-28  0:00     ` PRECOMPILATION Robert A Duff
replies disabled

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