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: Pascal MALAISE Subject: Re: PRECOMPILATION Date: 1999/02/09 Message-ID: <36C08503.510FE86B@magic.fr>#1/1 X-Deja-AN: 442514908 Content-Transfer-Encoding: 7bit References: <918556681.260459@dedale.pandemonium.fr> <1999Feb9.081125.1@eisner> X-Client: Magic On Line [unknown@ppp10-194.magic.fr] X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ulysse.magic.fr X-Trace: ulysse.magic.fr 918586627 911 127.0.0.1 (9 Feb 1999 18:57:07 GMT) Organization: Magic On Line Mime-Version: 1.0 NNTP-Posting-Date: 9 Feb 1999 18:57:07 GMT Newsgroups: comp.lang.ada Date: 1999-02-09T18:57:07+00:00 List-Id: 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 -D [-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