From: mheaney@ni.net (Matthew Heaney)
Subject: Re: Distinguishing type names from other identifiers
Date: 1998/01/24
Date: 1998-01-24T00:00:00+00:00 [thread overview]
Message-ID: <mheaney-ya023680002401981014240001@news.ni.net> (raw)
In-Reply-To: 34BD097C.3E9B@gsfc.nasa.gov
In article <34BD097C.3E9B@gsfc.nasa.gov>, Stephen.Leake@gsfc.nasa.gov wrote:
>Matthew Heaney wrote:
>>
>> In article <01bd2078$a449b460$41fd82c1@xhv46.dial.pipex.com>, "Nick
>> Roberts" <Nick.Roberts@dial.pipex.com> wrote:
>>
>> >
>> >For example:
>> >
>> > type Hour_Of_Day is range 0..23;
>> > type Minute_Of_Hour is range 0..59;
>> > type Seconds_Past_Minute is delta 0.001 range 0.000 .. 59.999;
>>
>>
>> Do this if you really don't want 60.0 in the range:
>>
>> type Seconds_Past_Midnight_Base is
>> delta 0.001 range 0.0 .. 60.0;
>>
>> subtype Seconds_Past_Midnight is
>> Seconds_Past_Midnight range 0.0 .. Seconds_past_Midnight_Base'Succ (60.0);
>>
>> The idea is let the compiler figure out what the largest value is, by using
>> T'Succ. Declaring a subtype of a first named subtype is a technique few
>> programmers take advantage of.
>
>Surely, if you mean to _exclude_ 60.0, you should use 'Pred?
Yes, I did mean T'Pred. Sorry for any confusion.
Matt
--------------------------------------------------------------------
Matthew Heaney
Software Development Consultant
<mailto:matthew_heaney@acm.org>
(818) 985-1271
next prev parent reply other threads:[~1998-01-24 0:00 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-01-07 0:00 Two simple language questions Chip Richards
1998-01-07 0:00 ` Dale Stanbrough
1998-01-07 0:00 ` Tucker Taft
1998-01-07 0:00 ` Matthew Heaney
1998-01-10 0:00 ` Two simple language questions (plural types) Michael F Brenner
1998-01-10 0:00 ` Robert Dewar
1998-01-10 0:00 ` Matthew Heaney
1998-01-10 0:00 ` Robert Dewar
1998-01-12 0:00 ` Anonymous
1998-01-12 0:00 ` Matthew Heaney
1998-01-12 0:00 ` Brian Rogoff
1998-01-13 0:00 ` Robert Dewar
1998-01-13 0:00 ` Distinguishing type names from other identifiers Nick Roberts
1998-01-13 0:00 ` Matthew Heaney
1998-01-14 0:00 ` Stephen Leake
1998-01-24 0:00 ` Matthew Heaney [this message]
1998-01-15 0:00 ` Anonymous
1998-01-24 0:00 ` Matthew Heaney
1998-01-24 0:00 ` Martin M Dowie
1998-01-24 0:00 ` Martin M Dowie
1998-01-24 0:00 ` Pred Nick Roberts
1998-01-25 0:00 ` Distinguishing type names from other identifiers Matthew Heaney
1998-01-15 0:00 ` Aaro Koskinen
1998-01-17 0:00 ` Martin M Dowie
1998-01-17 0:00 ` Martin M Dowie
1998-01-25 0:00 ` Matthew Heaney
1998-01-25 0:00 ` Brian Rogoff
[not found] ` <n5rs5FAStOz0Ew2+@dowie-cs.demon.co.uk>
1998-01-26 0:00 ` Brian Rogoff
1998-01-27 0:00 ` Martin M Dowie
1998-01-27 0:00 ` Brian Rogoff
1998-01-27 0:00 ` Matthew Heaney
1998-01-28 0:00 ` Brian Rogoff
1998-01-28 0:00 ` Matthew Heaney
1998-01-29 0:00 ` Brian Rogoff
1998-01-30 0:00 ` Mats Weber
1998-01-28 0:00 ` Martin M Dowie
1998-01-12 0:00 ` Two simple language questions (plural types) Brian Rogoff
1998-01-11 0:00 ` Brian Rogoff
1998-01-07 0:00 ` Two simple language questions Robert Dewar
-- strict thread matches above, loose matches on Subject: below --
1998-01-13 0:00 Distinguishing type names from other identifiers Adam Beneschan
1998-01-14 0:00 ` Brian Rogoff
1998-01-15 0:00 ` Michael F Brenner
1998-01-15 0:00 ` Nick Roberts
1998-01-16 0:00 ` Robert Dewar
1998-01-16 0:00 ` Michael F Brenner
1998-01-16 0:00 ` Robert Dewar
1998-01-16 0:00 ` Brian Rogoff
1998-01-17 0:00 ` nabbasi
1998-01-18 0:00 ` Robert Dewar
1998-01-16 0:00 ` Robert Dewar
1998-01-21 0:00 ` Philip Brashear
1998-01-20 0:00 ` Benoit Jauvin-Girard
1998-01-20 0:00 ` Robert Dewar
1998-01-14 0:00 tmoran
1998-01-14 0:00 ` Robert Dewar
1998-01-14 0:00 ` Brian Rogoff
1998-01-14 0:00 ` nabbasi
1998-01-15 0:00 ` Brian Rogoff
1998-01-25 0:00 tmoran
1998-01-25 0:00 ` Brian Rogoff
1998-01-26 0:00 ` Nick Roberts
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox