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,6e99942bc28c7824 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!195.71.90.67.MISMATCH!news.unit0.net!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 14 Mar 2011 11:55:42 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Is Duration not a discrete type? References: <25878df1-a0a1-4890-af10-1c722302f469@d26g2000prn.googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4d7df429$0$7655$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 14 Mar 2011 11:55:37 CET NNTP-Posting-Host: 13aebcb6.newsspool1.arcor-online.net X-Trace: DXC=fM8^nZ:5OLKlU`@c^jLCbJic==]BZ:afN4Fo<]lROoRA<`=YMgDjhgBc1a@Zj3Bnc\616M64>JLh>_cHTX3jMlYGfhEQ9fIK X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:19129 Date: 2011-03-14T11:55:37+01:00 List-Id: On 13.03.11 17:59, KK6GM wrote: > On Mar 12, 11:16 pm, Shark8 wrote: >> On Mar 12, 9:32 pm, KK6GM wrote: >> >>> I'm trying to create a task type with a Duration discriminant and >>> receive the GNAT error "discriminants must have a discrete or access >>> type". Can somebody help me to understand the problem here? >> >> Duration is a Fixed-point type if I remember correctly. >> >> This page, from the `83 LRM, indicates that to be the case:http://archive.adaic.com/standards/83lrm/html/lrm-09-06.html > > Yes, I didn't realize that fixed-point was not a discrete type. No > problem, I can just pass in a discrete value that represents > milliseconds and convert to a duration in the task. Alternatively, using Ada.Realtime, ... := To_Duration (Microseconds (you_integer_value));