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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d79d55198abf90d8 X-Google-Attributes: gid103376,public From: "E. Robert Tisdale" Subject: Re: Conditional Compilation Date: 2000/09/19 Message-ID: <39C7C748.4A533989@netwood.net>#1/1 X-Deja-AN: 671776284 Content-Transfer-Encoding: 7bit References: <7FEFA9E5E3B3C4A5.90418F4BE7D5AE58.48E094CF81EC6BD3@lp.airnews.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsabuse@supernews.com Organization: Posted via Supernews, http://www.supernews.com MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-09-19T00:00:00+00:00 List-Id: Kenneth Kueny wrote: > Does ADA have an analog to the C language #define, #ifdef constructs > commonly used to include or exclude certain blocks of code > in different code versions? This is a bit confusing. The C macro preprocessor wasn't originally part of the C computer programming language. It was, and still is, a separate program which accepted a C program "source file" and emitted a C program "translation unit". The typical C compiler accepts a translation unit and compiles it into assembly language code then calls the assembler to generate machine code. The ANSI/ISO C/C++ standards now specify syntax and semantics for the C macro preprocessor but you can still use the C macro preprocessor on Ada source files as long as the translation unit is an acceptable Ada program. Try it. It works. Now, professional programmers almost never write programs in Ada, C, C++ or any other standard computer programming language directly. They usually use perl, the m4 macro preprocessor, the sed stream editor or some combination of tools to write programs for them from "prototype files" which they maintain instead of source files. Of course, if you are distributing "open source" programs, you will need to distribute the prototype files and any special tools along with the source files so that other programmers can help to maintain an contribute to the prototype files as well.