comp.lang.ada
 help / color / mirror / Atom feed
From: Pascal MALAISE <malaise@magic.fr>
Subject: Re: PRECOMPILATION
Date: 1999/02/09
Date: 1999-02-09T18:57:07+00:00	[thread overview]
Message-ID: <36C08503.510FE86B@magic.fr> (raw)
In-Reply-To: 1999Feb9.081125.1@eisner

Larry Kilgallen wrote:

...
> set varying bounds
...
> definition of named constants.
...
> C "macros"
...

Agreed, Ada provides elegant solutions for that. 
But Vincent message seems to be about #ifdef, for which Ada has no
equivallent,
and which is very usefull when you interface several languanges, several
compilers
on several architectures.
Then, the ada definitions of the types are universal but the
representation clauses
are enclosed in precompilation options which can be set according to the
architecture (32/64 bits) or the compiler (aonix has a very specific
approach to record implementation (1) ):

#if defined (Linux)
for T use record ...
#elif defined (aonix)
...

The solution we use is to manage (archive) the sources as .common with
the
precompilation statements, preprocess them with 
cpp -D<operating system> -D<ada_compiler> [-traditional (2)]
to build the correct ada source.

Any better solution?

(1) AFAIK aonix is the only compiler which swaps fields in a record
(2) gnu cpp does not like unmatching quotes without this flag


-- 
Pascal MALAISE
(priv) mailto:malaise@magic.fr
(prof) mailto:malaise@fr.airsysatm.thomson-csf.com




  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 ` 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 Rakesh Malhotra
1999-02-19  0:00       ` PRECOMPILATION Samuel Mize
1999-02-18  0:00     ` PRECOMPILATION robert_dewar
1999-02-28  0:00     ` PRECOMPILATION Robert A Duff
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 Larry Kilgallen
1999-02-09  0:00   ` Pascal MALAISE [this message]
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 Tom Moran
1999-02-10  0:00       ` PRECOMPILATION Corey Ashford
1999-02-10  0:00       ` PRECOMPILATION robert_dewar
1999-02-10  0:00       ` PRECOMPILATION dennison
1999-02-09  0:00     ` PRECOMPILATION Tucker Taft
replies disabled

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