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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38159b1b5557a2e7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-24 07:39:57 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!elnk-pas-nf1!newsfeed.earthlink.net!pd7cy1no!shaw.ca!border1.nntp.ash.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!local1.nntp.sjc.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 24 Jan 2004 09:39:54 -0600 Date: Sat, 24 Jan 2004 10:39:50 -0500 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?) References: <49cbf610.0401170627.79c3dfe5@posting.google.com> <400A9B48.3060100@noplace.com> <400BD4B5.6000307@noplace.com> <400BDB7C.40100@noplace.com> <400D2150.6000705@noplace.com> <400E72F9.8060501@noplace.com> <100upo7ln5e3k59@corp.supernews.com> <400FC8E8.2040100@noplace.com> <_JSdna166JuxFo3dRVn-hg@comcast.com> <401115B7.5020205@noplace.com> <401268B4.1010704@noplace.com> In-Reply-To: <401268B4.1010704@noplace.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.147.77.160 X-Trace: sv3-IPmf3+mCRa3wlfPOhbZi0h52P9ZEH7RhT+JbDF455Y1Q9eC0qIRvOquA4Y1/DUeIvID2SX5OfKPE0aY!+gigJxNkpyUG/n6HevIGHMbHfBAxF2UNLmlS0BE2Fg0/Ah3ptnKqmxs1Gc9CqQ== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:4774 Date: 2004-01-24T10:39:50-05:00 List-Id: Marin David Condic wrote: > I suppose if we had some kind of "conditional with" we could construct a > few more layers of indirection and provide alternate implementations > that are picked up by the compiler. Some version of: > > with if (condition) Gnat_Solution ; > with if (condition) Aonix_Solution ; > > and assuming that Gnat_Solution and Aonix_Solution have an identical > interface (just different bodies) a similar "conditional use" in the > right context would let you connect to the right thing. But again you are trying hard to make things difficult for yourself. First, if the interface to Gnat_Solution and Aonix_Solution are identical, why do you want to make source that uses the interface compiler dependent? Both the Gnat and Aonix packages should be named Solution. ;-) Now that you have gone that far, you have banished all of the compiler dependencies to the body of Solution. Either use the tricks I described, or if the bodies are so different that it makes sense to mantain them separately, provide them as separate files, and use different makefiles for Aonix and Gnat. (Gnat likes to dictate the names of files, but it does provide facilities for overriding that.) -- Robert I. Eachus "The war on terror is a different kind of war, waged capture by capture, cell by cell, and victory by victory. Our security is assured by our perseverance and by our sure belief in the success of liberty." -- George W. Bush