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,a3176060eb5b787e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-24 04:25:48 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!stern.fokus.gmd.de!ceres.fokus.gmd.de!zib-berlin.de!news.mathworks.com!udel!gatech!newsfeed.pitt.edu!uunet!noc.near.net!inmet!asp!mg From: mg@asp.camb.inmet.com (Mitch Gart) Subject: Re: Does Ada have macros ? Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. X-Newsreader: TIN [version 1.1 PL8] References: <3kn413$259@newsbf02.news.aol.com> Date: Fri, 24 Mar 1995 12:25:48 GMT Date: 1995-03-24T12:25:48+00:00 List-Id: B Catlin (bcatlin@aol.com) wrote: : I don't seem to remember Ada 83 having a macro capability, does Ada 95 ? : If not, why not ? No macros, either in Ada 83 or Ada 95. General text-substitution macros like those in the C preprocessor are thought to be too unsafe. For example, a macro can refer to a variable X and depending where the macro is expanded X may or may not be visible. Ada programs are supposed to be readable and in many cases C macros are one of the main culprits in producing unreadable C programs. In C macros can be used (and mis-used) in lots of ways but three legitimate uses are for defining compile-time constants, types, and inline functions. Ada has all three of these facilities. Mitch Gart