From: Ray Blaak <rAYblaaK@STRIPCAPStelus.net>
Subject: Re: C Macros and their equivalent in Ada
Date: Tue, 09 Sep 2008 16:33:10 GMT
Date: 2008-09-09T16:33:10+00:00 [thread overview]
Message-ID: <uej3tth30.fsf@STRIPCAPStelus.net> (raw)
In-Reply-To: Pine.WNT.4.64.0809091436240.3584@teor1
Colin Paul Gloster <Colin_Paul_Gloster@ACM.org> writes:
> On Tue, 9 Sep 2008, RasikaSrinivasan@gmail.com wrote:
> |"are there Ada equivalents of the C macros like : |
> | |
> |__DATE__, __TIME__ |
>
> How about the function Ada.Calendar.Clock to get the current instant
The idea is to get the date/time the file was compiled.
Rasika, what I have often done is generate a source file from my build script
that has the version and build dates baked in. E.g. using ant:
<property name="VERSION" value="1.1"/>
<target name="generate.version">
<tstamp>
<format property="yyyyMMdd" pattern="yyyyMMdd"/>
</tstamp>
<echo file="src/Support/Version.adb">
package body Version is
function Version return String is
begin
return "${VERSION}";
end;
function Build return String is
begin
return "${yyyyMMdd}";
end;
end;
</echo>
</target>
Apologies for any errors, but it should get the idea across.
--
Cheers, The Rhythm is around me,
The Rhythm has control.
Ray Blaak The Rhythm is inside me,
rAYblaaK@STRIPCAPStelus.net The Rhythm has my soul.
next prev parent reply other threads:[~2008-09-09 16:33 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 [this message]
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
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