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: g2news1.google.com!postnews.google.com!l33g2000pri.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: C Macros and their equivalent in Ada Date: Tue, 9 Sep 2008 08:11:24 -0700 (PDT) Organization: http://groups.google.com Message-ID: <9e9bf767-d767-4bc9-b01a-7ae3c9b40531@l33g2000pri.googlegroups.com> References: NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1220973084 28800 127.0.0.1 (9 Sep 2008 15:11:24 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 9 Sep 2008 15:11:24 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l33g2000pri.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:1961 Date: 2008-09-09T08:11:24-07:00 List-Id: On Sep 9, 3:43 am, "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