comp.lang.ada
 help / color / mirror / Atom feed
From: stt@dsd.camb.inmet.com (Tucker Taft)
Subject: Re: Ada83 or DEC Ada: Feature or bug?
Date: Sun, 25 Sep 1994 12:32:01 GMT
Date: 1994-09-25T12:32:01+00:00	[thread overview]
Message-ID: <CwoqtD.K66@inmet.camb.inmet.com> (raw)
In-Reply-To: 360ecv$kq1@hacker.demon.co.uk

In article <360ecv$kq1@hacker.demon.co.uk>,
Stephen M. Youndt <steve@hacker.demon.co.uk> wrote:

>Is it a feature of Ada83 or DEC Ada that makes it impossible to work with
>unsigned values? MAX_INT always bites back with CONSTRAINT_ERROR when I try
>to do any real work with unsigned 32bit values (i.e. SYSTEM.UNSIGNED_LONGWORD).
>Both I and my coworkers find this terribly annoying. Is this part of Ada83
>or a DEC Ada peculiarity? 

Ada 83 only provided for signed integers.  However, many Ada 83 
vendors have provided special packages to circumvent this problem.  
Apparently DEC did not go all the way in supporting them.

> ... If Ada83, will it be fixed in 9X?

In Ada 9X, there are unsigned integers, called "modular integers,"
which allow the user to specify the wrap-around point.  To get
a 32-bit unsigned integer, you would declare it as:

   type Unsigned_32 is mod 2**32;

> ...
>Stephen M. Youndt   * Inet: steve@hacker.demon.co.uk  * CIS: 73121,3407
>                    *     Tel: +44 242 863 028        *

S. Tucker Taft  stt@inmet.com
Ada 9X Mapping/Revision Team
Intermetrics, Inc.
Cambridge, MA 02138



  reply	other threads:[~1994-09-25 12:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-09-24  5:45 Ada83 or DEC Ada: Feature or bug? Stephen M. Youndt
1994-09-25 12:32 ` Tucker Taft [this message]
1994-09-26 12:54 ` Robert Dewar
1994-09-26 23:38 ` Wayne Magor
1994-09-27 12:35   ` Bevin R. Brett
1994-10-05  7:59   ` Mike Ellis.......(310) 334-1652
replies disabled

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