🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3749

Re: Why "long long" doesn't work.

#3749
From: Mark S. Larsen
Date: Wed, 16 Aug 1995 18:07
48 lines
3302 bytes
I suppose that I am likely to get flamed here, but if you want to tell the
compiler what range of values you want an integer to take, you could write the
code in Ada (either Ada83 or Ada95). Ada has been doing this for over ten years.

Mark

In article <1995Aug13.144107.21353@dcs.warwick.ac.uk> A.Main@dcs.warwick.ac.uk (Zefram) writes:

   Newsgroups: comp.std.c
   Path: newdelph.cig.mot.com!mothost!ftpbox!newsfeed.acns.nwu.edu!math.ohio-state.edu!howland.reston.ans.net!tank.news.pipex.net!pipex!sunsite.doc.ic.ac.uk!daresbury!hgmp.mrc.ac.uk!news.dcs.warwick.ac.uk!not-for-mail
   From: A.Main@dcs.warwick.ac.uk (Zefram)
   X-Nntp-Posting-Host: stone
   Sender: news@dcs.warwick.ac.uk (Network News)
   Organization: Department of Computer Science, Warwick University, England
   References: <3v9s4l$9t5@caip.rutgers.edu> <3vbmks$25u@newsbf02.news.aol.com> <HBF.95Jul31180524@durin.uio.no> <3vk874$e0q@caip.rutgers.edu>
   Date: Sun, 13 Aug 1995 14:41:07 GMT
   Lines: 24

   <halasz@caip.rutgers.edu> wrote:
   >Yes, it requires it, if I want to declare a variable of the shortest 'int'
   >that can hold a numeral of so manie digits.  No other feature suggested is
   >useful, and therefore no "atleast:" is reallie needed.

   atleast: certainly *is* needed.  What you propose (declaring a veraible
   that can hold a specified number of decimal digits) is the same thing,
   with a different -- and far less useful -- means of specification.  The
   atleast: proposal, if implemented, would allow one to specify how large
   an integer is required, which is an essential ability.  (I'm curious as
   to why C -- in other ways unusually close to the hardware and under the
   programmer's control -- used data types of largely unknown size.)

   And why do you suggest that integer ranges be specified in terms of
   numbers of digits?  Bits make much more sense, as the value is actually
   repesented as bits.  Have you considered what the effects of your
   specification method would be?  If I want to represent a number in the
   range 0..255 -- not an unusual requirement -- I would specify "unsigned
   atleast:8", or possibly "unsigned exact:8", under the SBEIR proposal,
   and would get a single byte type on most systems.  Under your proposal,
   I would have to specify "at least 3 digits", and would consequently get
   a 16-bit, two byte, type on most systems.

   -zefram
--
-- Mark Larsen                         | Motorola - IL27
-- Desk/Voice: (708)632-4704           | 3205 North Wilke
-- FAX:        (708)632-3741           | Arlington Heights, IL 60004
-- E-Mail:     larsenms@cig.mot.com    | USA
Technical Details
Message-ID: <LARSENMS.95Aug16130711@masonite40.cig.mot.com>
Path: arc1-ca.pugleaf.net!newdelph.cig.mot.com!motcig!larsenms
References: <3v9s4l$9t5@caip.rutgers.edu> <3vbmks$25u@newsbf02.news.aol.com> <HBF.95Jul31180524@durin.uio.no> <3vk874$e0q@caip.rutgers.edu> <1995Aug13.144107.21353@dcs.warwick.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!newdelph.cig.mot.com!motcig!larsenms
From: larsenms@cig.mot.com (Mark S. Larsen)
Newsgroups: comp.std.c
Subject: Re: Why "long long" doesn't work.
Date: 16 Aug 1995 18:07:10 GMT
Organization: Motorola Inc., Cellular Infrastructure Group
Message-ID: <LARSENMS.95Aug16130711@masonite40.cig.mot.com>
References: <3v9s4l$9t5@caip.rutgers.edu> <3vbmks$25u@newsbf02.news.aol.com>
 <HBF.95Jul31180524@durin.uio.no> <3vk874$e0q@caip.rutgers.edu>
 <1995Aug13.144107.21353@dcs.warwick.ac.uk>
NNTP-Posting-Host: masonite40.rtsg.mot.com
In-reply-to: A.Main@dcs.warwick.ac.uk's message of Sun, 13 Aug 1995 14:41:07 GMT