From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: C Macros and their equivalent in Ada
Date: Tue, 9 Sep 2008 07:39:28 -0700 (PDT)
Date: 2008-09-09T07:39:28-07:00 [thread overview]
Message-ID: <90d69a98-ab81-45b2-bd0e-18675b327b66@d77g2000hsb.googlegroups.com> (raw)
In-Reply-To: f0560361-31c2-4a3d-851c-639cdfc5ac46@i76g2000hsf.googlegroups.com
RasikaSrinivasan@gmail.com wrote:
> are there Ada equivalents of the C macros like :
>
> __DATE__, __TIME__
>
> My searches have not revealed anything. have i missed any obvious
> pragmas?
No, Ada does not have macros. I am not aware of any compiler that
provides the equivalent of C's __DATE__ and __TIME__ macros (which,
for those here who don't know C, expand to the date and time at which
preprocessing took place, as strings).
If you need that feature, you're better off generating an Ada source
file from the "date" utility, e.g.
echo "package Compilation_Date is" > compilation_date.ads
echo " Timestamp : constant String := \"$(date --full-ISO)\";" >>
compilation_date.ads
echo "end Compilation_Date;" >> compilation_date.ads
HTH
--
Ludovic Brenta.
next prev parent reply other threads:[~2008-09-09 14:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 10:43 C Macros and their equivalent in Ada RasikaSrinivasan
2008-09-09 13:45 ` Colin Paul Gloster
2008-09-09 16:33 ` Ray Blaak
2008-09-09 18:54 ` RasikaSrinivasan
2008-09-10 0:16 ` Ray Blaak
2008-09-09 14:11 ` Jeffrey R. Carter
2008-09-09 14:39 ` Ludovic Brenta [this message]
2008-09-09 20:57 ` Maciej Sobczak
2008-09-10 6:57 ` Per Sandberg
2008-09-10 19:22 ` Keith Thompson
2008-09-09 15:11 ` Adam Beneschan
2008-09-13 3:33 ` Steve
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox