comp.lang.ada
 help / color / mirror / Atom feed
From: davea@linkmsd.com (David Arno)
Subject: Re: Does Ada have macros ?
Date: Mon, 27 Mar 1995 09:15:30 +0000
Date: 1995-03-27T09:15:30+00:00	[thread overview]
Message-ID: <796295730snz@linkmsd.com> (raw)
In-Reply-To: 3kn413$259@newsbf02.news.aol.com

In article <3kn413$259@newsbf02.news.aol.com> bcatlin@aol.com "B Catlin" writes:

: I don't seem to remember Ada 83 having a macro capability, does Ada 95 ? 
: If not, why not ?
: 

I once came across a piece of C code that looked something like this (small
section only shown):

IF (JRXBBB NE JKLFUEL) THEN
   RRXFLOWR = 1.0;
ELSE
   RRXFLOWR = 2.0;
ENDIF;

etc. Basically, the person who wrote it had used FORTRAN for many years and
when required to use C, decided he hated it so created masses of macros that
allowed him to write C code with an (almost) FORTRAN syntax.

While this is an extreme case, such (mis)use of macros in languages such as
C is common and this is why I approve of languages like Ada that supply no
macro facility. What you see in a piece of Ada code is what you get (within
a debugger for example). This does not hold true for C or other macro languages.

-- 
David Arno



      parent reply	other threads:[~1995-03-27  9:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-21 17:56 Does Ada have macros ? B Catlin
1995-03-23  1:34 ` Robert Dewar
1995-03-24 12:25 ` Mitch Gart
1995-03-25 16:10   ` Henry Baker
1995-03-27  2:50     ` B Catlin
1995-03-27  9:15 ` David Arno [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox