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=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!husc6!think!ames!ncar!noao!nud!mcdchg!clyde!rds@moss.ATT.COM From: rds@moss.ATT.COM Newsgroups: comp.lang.ada Subject: Re: Conditional compilation Message-ID: <28254@clyde.ATT.COM> Date: 17 Jun 88 13:53:58 GMT References: <909*haug@vax.runit.unit.uninett> Sender: nuucp@clyde.ATT.COM Reply-To: rds@moss.UUCP (Richard DeSimine) Organization: AT&T Bell Laboratories, Whippany NJ List-Id: On the issue of conditional compilations in Ada... Our Ada requirements would be well suited by a conditional compilation but our application must be portable. My interpretation of LRM 10.6(2) is since the compiler omits code not referenced the programmer can omit code by conditionally (not) referencing it and setting static conditions for evaluation at compile time. If this is, in fact, what the LRM intends to say it is an insufficient method for conditional compilation. Consider the following scenario: Package A is generic with a generic type parameter. Package B is generic with the same generic parameter. A particular system requires only package A and another system requires both A & B. B's compilation requires the existance of an instantiated version of A. It is important that the customer with system A who does not need package B not get package B and not neccesarily know of the existance of package B. An appropriate solution (in a C environment) is to conditionally include the code for package B with package A at compilation time. The LRM does not require the implementation of an include like feature. Is there an accepted practice for "including" files in the Ada world? Richard DeSimine AT&T Bell Laboratories (201) 386-2059