comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: C Macros and their equivalent in Ada
Date: Tue, 9 Sep 2008 08:11:24 -0700 (PDT)
Date: 2008-09-09T08:11:24-07:00	[thread overview]
Message-ID: <9e9bf767-d767-4bc9-b01a-7ae3c9b40531@l33g2000pri.googlegroups.com> (raw)
In-Reply-To: f0560361-31c2-4a3d-851c-639cdfc5ac46@i76g2000hsf.googlegroups.com

On Sep 9, 3:43 am, "RasikaSriniva...@gmail.com"
<RasikaSriniva...@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?
>
> thanks, srini

Ada doesn't have a standard mechanism for providing the compilation
date and time.  There's no reason why a particular implementation
couldn't provide something like this, though---perhaps a package with
special String constants or functions (most likely using pragma
Import) that would cause the compiler to substitute the compile date/
time when the constant or function is used.  Our compiler has
something like this.  Don't know whether GNAT does.  If you need it,
you may want to ask your compiler vendor for this sort of feature.  It
shouldn't be terribly difficult to implement.

                                  -- Adam



  parent reply	other threads:[~2008-09-09 15:11 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
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 [this message]
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