From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,355f90547d1b4b5 X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: PRECOMPILATION Date: 1999/02/09 Message-ID: <36C0B5D4.DEF83A66@averstar.com>#1/1 X-Deja-AN: 442576748 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <918556681.260459@dedale.pandemonium.fr> Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-02-09T00:00:00+00:00 List-Id: =:-) Vincent wrote: > > Are there precompilation instructions in Ada95, > like in C (#ifdef,...etc) ? In other words, how can > I set compilation conditions ? Some Ada compilers have built in support for a preprocessor. Some companies use the C preprocessor itself as a pre-pass over the source. However, we have had good experience with making the unit of variation be the whole source file. Typically you can define a small number of primitive types and constants which can isolate out the environment-specificity from all other source files. Then you only need to select which version of this one source file you will use to switch from one environment to another. Our experience is that this approach is dramatically more maintainable that spreading #ifdef's or equivalent out all over the code. > Thanks. > > Vincent -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA