From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f0aecf9351d714ac X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!d77g2000hsb.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: C Macros and their equivalent in Ada Date: Tue, 9 Sep 2008 07:39:28 -0700 (PDT) Organization: http://groups.google.com Message-ID: <90d69a98-ab81-45b2-bd0e-18675b327b66@d77g2000hsb.googlegroups.com> References: NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1220971168 22399 127.0.0.1 (9 Sep 2008 14:39:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 9 Sep 2008 14:39:28 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d77g2000hsb.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20040924,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7688 Date: 2008-09-09T07:39:28-07:00 List-Id: 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.