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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,94fc86d98e502e9d,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!f24g2000vbf.googlegroups.com!not-for-mail From: dhenry Newsgroups: comp.lang.ada Subject: Duration'Image, Duration'Value and Duration'Last Date: Thu, 19 Feb 2009 07:33:23 -0800 (PST) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 80.156.46.53 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1235057603 23895 127.0.0.1 (19 Feb 2009 15:33:23 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 19 Feb 2009 15:33:23 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f24g2000vbf.googlegroups.com; posting-host=80.156.46.53; posting-account=EZVF2goAAABmd4nprEqIYBBoiiKbAL2e User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.0.6) Gecko/2009020911 Ubuntu/8.10 (intrepid) Firefox/3.0.6,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:4672 Date: 2009-02-19T07:33:23-08:00 List-Id: Hello, I'm experimenting something strange when manipulating Duration'Image, Duration'Value and Duration'Last with GNAT : The result of Duration'Value(Duration'Image(Duration'Last)) is different from the result of S : String := Duration'Image (Duration'Last) and then Duration'Value(S). Here is a test program that shows the issue: ----------------------------------------------------- with Ada.Text_IO; use Ada.Text_IO; procedure Test is S : String := Duration'Image (Duration'Last); D : Duration := Duration'Value (S); begin Put_Line (Duration'Image (D)); Put_Line (Duration'Image (Duration'Last)); end Test; ----------------------------------------------------- This test program gives me: -9223372036.854775810 9223372036.854775810 Note that -9223372036.854775810 seems to be Duration'First... Is it expected? Can someone tell me what happens here? why this difference? Yours, David.