comp.lang.ada
 help / color / mirror / Atom feed
From: wemagor@fms0.cca.rockwell.com (Wayne Magor)
Subject: Re: Ada83 or DEC Ada: Feature or bug?
Date: Mon, 26 Sep 1994 23:38:18 GMT
Date: 1994-09-26T23:38:18+00:00	[thread overview]
Message-ID: <CwrGBu.CJr@lazrus.cca.rockwell.com> (raw)
In-Reply-To: 360ecv$kq1@hacker.demon.co.uk


In article <360ecv$kq1@hacker.demon.co.uk>, steve@hacker.demon.co.uk (Stephen M. Youndt) writes:
>
>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? If Ada83, will it be fixed in 9X?

This was a problem with Ada83 which is fixed in Ada-9X.  DEC defined
System.Unsigned_Longword like this:

   type UNSIGNED_LONGWORD is range -2_147_483_648 .. 2_147_483_647;
   for  UNSIGNED_LONGWORD'SIZE use 32;

whereas they defined System.Unsigned_Word like this:

   type UNSIGNED_WORD is range 0 .. 65535;
   for  UNSIGNED_WORD'SIZE use 16;

You can't really use Unsigned_Longword for much of anything except to
interface to other routines.

Wayne.



  parent reply	other threads:[~1994-09-26 23:38 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
1994-09-26 12:54 ` Robert Dewar
1994-09-26 23:38 ` Wayne Magor [this message]
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