From: Pascal Obry <pascal@obry.net>
To: ada_develop <luis.sainz@gmail.com>
Subject: Re: Discriminating Ada source code through compiler arguments
Date: Tue, 27 Dec 2005 12:01:35 +0100
Date: 2005-12-27T12:01:40+01:00 [thread overview]
Message-ID: <43B11F0F.3040609@obry.net> (raw)
In-Reply-To: <1135679115.072709.20600@g14g2000cwa.googlegroups.com>
ada_develop a �crit :
> Hello. I�m a newie in Ada and I want to known how can I pass arguments
> to the compiler to discriminate parts of a Ada source code. Something
> like the #ifdefs that we can use in the C programming languaje.
This really depends on your compiler. There is not standard for doing
this in Ada. Note that this is by design, #ifdef is considered bad
practice and a maintenance nightmare!
If you are using GNAT you can check gnatprep.
But a better solution is often to have one spec and multiple bodies for
different implementations. But without knowing more about your goal it
is difficult to devise the solution.
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
prev parent reply other threads:[~2005-12-27 11:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-27 10:25 Discriminating Ada source code through compiler arguments ada_develop
2005-12-27 11:01 ` Pascal Obry [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox