comp.lang.ada
 help / color / mirror / Atom feed
* Discriminating Ada source code through compiler arguments
@ 2005-12-27 10:25 ada_develop
  2005-12-27 11:01 ` Pascal Obry
  0 siblings, 1 reply; 2+ messages in thread
From: ada_develop @ 2005-12-27 10:25 UTC (permalink / raw)


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.

Thank you.




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Discriminating Ada source code through compiler arguments
  2005-12-27 10:25 Discriminating Ada source code through compiler arguments ada_develop
@ 2005-12-27 11:01 ` Pascal Obry
  0 siblings, 0 replies; 2+ messages in thread
From: Pascal Obry @ 2005-12-27 11:01 UTC (permalink / raw)
  To: ada_develop

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-27 11:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-27 10:25 Discriminating Ada source code through compiler arguments ada_develop
2005-12-27 11:01 ` Pascal Obry

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