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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: PRECOMPILATION Date: 1999/02/09 Message-ID: <1999Feb9.081125.1@eisner>#1/1 X-Deja-AN: 442408325 X-Nntp-Posting-Host: eisner.decus.org References: <918556681.260459@dedale.pandemonium.fr> X-Trace: news.decus.org 918565895 2285 KILGALLEN [192.67.173.2] Organization: LJK Software Reply-To: Kilgallen@eisner.decus.org.nospam Newsgroups: comp.lang.ada Date: 1999-02-09T00:00:00+00:00 List-Id: In article <918556681.260459@dedale.pandemonium.fr>, "=:-) Vincent" writes: > Are there precompilation instructions in Ada95, > like in C (#ifdef,...etc) ? In other words, how can > I set compilation conditions ? Conditional compilation is explicitly omitted from Ada to avoid a host of problems (not the least of which is readability issues). For situations where you would use the C preprocessor to set varying bounds, a small package declaring the current values is appropriate. At compile-time you can substitute a different rendition of that package which has different limits. One strange case often handled by the C preprocessor is the definition of named constants. If this is your interest, take a look at Ada enumerated types. The piece of Ada which most closely matches C "macros" would be Ada "generics". At a rough level, you can first think of them as "macros with type checking". There are certainly (unsafe) thinks you can do with C macros that are not possible with Ada generics, but then again C macros are a crude shadow of the macro capabilities of a language like Bliss. Larry Kilgallen