comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Is Duration not a discrete type?
Date: Mon, 14 Mar 2011 11:55:42 +0100
Date: 2011-03-14T11:55:37+01:00	[thread overview]
Message-ID: <4d7df429$0$7655$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <b9408741-8d45-4645-a7b7-dbb3ee62256b@22g2000prx.googlegroups.com>

On 13.03.11 17:59, KK6GM wrote:
> On Mar 12, 11:16 pm, Shark8 <onewingedsh...@gmail.com> wrote:
>> On Mar 12, 9:32 pm, KK6GM <mjsi...@scriptoriumdesigns.com> 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));



      reply	other threads:[~2011-03-14 10:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-13  4:32 Is Duration not a discrete type? KK6GM
2011-03-13  6:16 ` Shark8
2011-03-13 16:59   ` KK6GM
2011-03-14 10:55     ` Georg Bauhaus [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox