comp.lang.ada
 help / color / mirror / Atom feed
From: George Haddad <haddad#m#_george@mmac.is.lmsc.lockheed.com>
Subject: Re: DECAda/VMS - calling GETJPI
Date: 1996/06/06
Date: 1996-06-06T00:00:00+00:00	[thread overview]
Message-ID: <31B725E7.8A8@mmac.is.lmsc.lockheed.com> (raw)


Robert Dewar wrote:
> Consider the following example: 
>     type x is mod 10;
>     subtype y is x range 0 .. 5;

   [snip]

> Actually to be strict, the constraint error is raised by the
> conversion because -1 is not in the set of values for
> modular type x (0 .. 10).

   At last!  An opportunity to nitpick one of the comp.lang.ada 
greats.  (Or embarrass myself horribly -- you be the judge.  :-))  I 
would certainly hope that the allowable range of values for type x
is 0..9.  ;-)  Otherwise, what about this:

   V1 : constant x := 0;
   V2 : constant x := 10;
   if (V1 = V2) then Text_IO.Put_Line("Zero equals Ten."); end if;
-- 
I found these opinions on my doorstep, would you please give them a 
good home?




             reply	other threads:[~1996-06-06  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-06  0:00 George Haddad [this message]
1996-06-07  0:00 ` DECAda/VMS - calling GETJPI Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1996-06-03  0:00 Alan Paterson
1996-06-03  0:00 ` Mats Weber
1996-06-03  0:00 ` Stuart Palin
1996-06-03  0:00   ` Michael F Brenner
1996-06-03  0:00     ` Robert Dewar
1996-06-04  0:00       ` Ken Garlington
1996-06-06  0:00         ` Robert Dewar
1996-06-04  0:00       ` Michael F Brenner
1996-06-04  0:00         ` Robert Dewar
1996-06-04  0:00           ` Michael F Brenner
1996-06-04  0:00             ` Robert Dewar
1996-06-04  0:00             ` Robert Dewar
1996-06-05  0:00               ` Fergus Henderson
1996-06-05  0:00                 ` Robert A Duff
1996-06-05  0:00               ` Robert A Duff
1996-06-05  0:00                 ` Robert Dewar
1996-06-05  0:00             ` Adam Beneschan
1996-06-07  0:00               ` Norman H. Cohen
1996-06-11  0:00                 ` Adam Beneschan
1996-06-03  0:00 ` Ken Garlington
replies disabled

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