comp.lang.ada
 help / color / mirror / Atom feed
From: Colin Paul Gloster <Colin_Paul_Gloster@ACM.org>
Subject: Re: C Macros and their equivalent in Ada
Date: Tue, 9 Sep 2008 14:45:08 +0100
Date: 2008-09-09T14:45:08+01:00	[thread overview]
Message-ID: <Pine.WNT.4.64.0809091436240.3584@teor1> (raw)
In-Reply-To: <f0560361-31c2-4a3d-851c-639cdfc5ac46@i76g2000hsf.googlegroups.com>

On Tue, 9 Sep 2008, 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?"                                                        |
|-----------------------------------------------------------------|

How about the function
Ada.Calendar.Clock
to get the current instant and passing that to the Date parameter of
the Ada.Calendar.Split procedure (such that the date would be output
to the other parameters)?

Similarly you could use / and mod to get the time of day from
Ada.Calendar.Seconds.

See
WWW.AdaIC.org/standards/05rm/html/RM-9-6.html#I3741
.

Regards,
Colin Paul Gloster



  reply	other threads:[~2008-09-09 13:45 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 [this message]
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
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