From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ba0587ecc5989bed X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-27 16:18:15 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-hub.siol.net!zur.uu.net!ash.uu.net!spool0902.news.uu.net!reader0900.news.uu.net!not-for-mail Sender: DB3L@CTWD0143 Newsgroups: comp.lang.ada Subject: Re: Another problem with stream reading. References: <3CA0B5C4.2060804@home.com> From: David Bolen Date: 27 Mar 2002 19:18:20 -0500 Message-ID: Organization: Fitlinxx, Inc. - Stamford, CT X-Newsreader: Gnus v5.7/Emacs 20.6 NNTP-Posting-Host: 208.247.212.3 X-Trace: 1017274681 reader0.ash.ops.us.uu.net 8978 208.247.212.3 Xref: archiver1.google.com comp.lang.ada:21737 Date: 2002-03-27T19:18:20-05:00 List-Id: "Randy Brukardt" writes: > Janus/Ada, at least, will generate code for your type byte as if it is > unsigned (that has necessary for Ada 83, which had no unsigned types at > all), with all of the checking. But where the language requires the base > type (such as in streams), we have to use signed 16-bits. > > The place this matters, of course, is for the largest unsigned type. If > you declare > type Unsigned is range 0 .. (2**32)-1; > in Janus/Ada for Windows, you'll get an error, because there is no > signed base type large enough to fit it. How would you typically work around this, if you really wanted to be working with 32-bit unsigned quantities in your code? If there's no signed base type large enough (sans 64-bit support presumably) would you have to implement your own set of operations on, say, a data type made out of two 16-bit values? -- -- David -- /-----------------------------------------------------------------------\ \ David Bolen \ E-mail: db3l@fitlinxx.com / | FitLinxx, Inc. \ Phone: (203) 708-5192 | / 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \ \-----------------------------------------------------------------------/