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,cae92f92d6a1d4b1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!22g2000prx.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Ada.Execution_Time Date: Thu, 16 Dec 2010 09:45:02 -0800 (PST) Organization: http://groups.google.com Message-ID: <4d0bc641-4db3-43cc-9b74-4b2075bedb6a@22g2000prx.googlegroups.com> References: <4d05e737$0$6980$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1292521502 12962 127.0.0.1 (16 Dec 2010 17:45:02 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 16 Dec 2010 17:45:02 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 22g2000prx.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:15986 Date: 2010-12-16T09:45:02-08:00 List-Id: On Dec 16, 9:24=A0am, BrianG wrote: > Simon Wright wrote: > > BrianG writes: > > >>> Arguably, CPU_Time is misnamed, because it is *not* > >>> some sort of time type. > >> Then the package is misnamed too - How is "Execution_Time" not a time? > > > A 'time type' > > [http://www.adaic.com/resources/add_content/standards/05rm/html/RM-9-6.= ..] > > (6) can be used as the argument for a delay statement. Wouldn't make a > > lot of sense for an execution time! (well, perhaps one could think of > > some obscure use ...) > > (Actually for a delay_until.) =A0That paragraph seems to contradict the > previous one which says "any nonlimited type". No, not really. The rule that says "any nonlimited type" is a Name Resolution Rule. Those rules control how the language resolves possibly ambiguous statements. It's important to realize that Name Resolution Rules are not legality rules, and it's possible for something to be illegal and still satisfy the Name Resolution Rules, which means that a "possible interpretation" can still cause an ambiguity even if it's illegal. Example: type Int is new Integer; function Overloaded (N : Integer) return Integer; function Overloaded (N : Integer) return Character; X : Int :=3D Int (Overloaded (5)); This last call to Overloaded is ambiguous (and therefore illegal) even though one definition of Overloaded returns a Character which cannot legally be converted to Int. The type conversion from a Character- returning function to Int still satisfies the Name Resolution Rules (4.6(6)). Moral: Don't look at Name Resolution Rules if you're trying to figure out whether something is legal. (Other than when trying to figure out whether something is unambiguous.) >=A0Shouldn't (6) define > Real_Time.Time since it's not Calendar.Time and isn't > implementation-defined? =A0 It should probably say "language-defined or implementation-defined". D.8(18) does say that Real_Time.Time is one of those "time types". -- Adam