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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fd63afa4dc364b7e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-21 10:10:46 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!204.94.211.44!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.sttls1.wa.home.com.POSTED!not-for-mail From: "Mark Lundquist" Newsgroups: comp.lang.ada References: <98m938$2iod0$1@ID-25716.news.dfncis.de> Subject: Re: Implementing C/C++ style #include... X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Message-ID: Date: Wed, 21 Mar 2001 18:07:03 GMT NNTP-Posting-Host: 24.20.66.55 X-Complaints-To: abuse@home.net X-Trace: news1.sttls1.wa.home.com 985198023 24.20.66.55 (Wed, 21 Mar 2001 10:07:03 PST) NNTP-Posting-Date: Wed, 21 Mar 2001 10:07:03 PST Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: supernews.google.com comp.lang.ada:5972 Date: 2001-03-21T18:07:03+00:00 List-Id: bhazzard wrote in message news:OrZxgIisAHA.289@cpmsnbbsa09... > A quick question... > > Is there any way to implement c/c++ style > #ifdef pre-processor statements in Ada. > > Do Ada compilers have a pre-processor ? Some do (see below)... there's no standard preprocesor for Ada... > > I am using Rational on an Sgi and Green Hills on a Sun... the manual set(s) > appear to have no reference to such things... This is what I want to do... Well, Rational *does* have an Ada preprocessor! :-) If you're using Apex, look in the online Ada Compiler Reference Guide -- there's a whole big section on the Ada Preprocessor. If you're using VADS you also have this same preprocessor, and I can't tell you where to look in the docs, but I know it was documented in the manual set. The Rational Ada Preprocessor has an Ada-style syntax and is Ada-like in spirit. It's not cpp-compatible ("#ifdef", etc.). It doesn't have a cpp-style macro facility (judged to be too unsafe and non-Ada-like :-). It *does* support file inclusion (very useful for including files that contain only preprocessor definitions). Syntax example (*not* a suggested application! :-) # Mode : constant Text := "Know_It_All"; . . . # if Mode = "Bonehead" then # if Verbose'Defined and then Verbose = "Full" then . . . # end if; # end if; Hope this helps, Mark Lundquist Rational Software