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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c35edbbda4c7f58f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!newsfeed.stueberl.de!newsr1.ipcore.viaginterkom.de!news-peer1!btnet-feed5!btnet!news.btopenworld.com!not-for-mail From: "Martin Dowie" Newsgroups: comp.lang.ada Subject: Re: Conditional compilation in Ada? Date: Tue, 16 Nov 2004 20:43:17 +0000 (UTC) Organization: BT Openworld Message-ID: References: <1100632383.66582@master.nyc.kbcfp.com> NNTP-Posting-Host: host81-152-56-142.range81-152.btcentralplus.com X-Trace: titan.btinternet.com 1100637797 23260 81.152.56.142 (16 Nov 2004 20:43:17 GMT) X-Complaints-To: news-complaints@lists.btinternet.com NNTP-Posting-Date: Tue, 16 Nov 2004 20:43:17 +0000 (UTC) X-RFC2646: Format=Flowed; Response X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MSMail-Priority: Normal X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Xref: g2news1.google.com comp.lang.ada:6236 Date: 2004-11-16T20:43:17+00:00 List-Id: Hyman Rosen wrote: > Jeffrey Carter wrote: >> Yes. Don't use preprocessing. > > Yes, especially in the way he's proposing. > Leaving little #ifdefs everywhere is bad practice even > in languages which allow it. > >> It sounds as if you have a good use for a variant record: > > The OP is running two separate programs. There should be a > better solution than forcing him to make runtime tests for > something which is static. Why would this require a run-time check? The actual variant is known at compile time and stored as a constant (in the example).