🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3717

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

#3717
From: Zefram
Date: Sun, 13 Aug 1995 14:41
24 lines
1916 bytes
<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
Technical Details
Message-ID: <1995Aug13.144107.21353@dcs.warwick.ac.uk>
Path: arc1-ca.pugleaf.net!news.dcs.warwick.ac.uk!not-for-mail
References: <3v9s4l$9t5@caip.rutgers.edu> <3vbmks$25u@newsbf02.news.aol.com> <HBF.95Jul31180524@durin.uio.no> <3vk874$e0q@caip.rutgers.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!news.dcs.warwick.ac.uk!not-for-mail
From: A.Main@dcs.warwick.ac.uk (Zefram)
Subject: Re: Why "long long" doesn't work.
X-Nntp-Posting-Host: stone
Message-ID: <1995Aug13.144107.21353@dcs.warwick.ac.uk>
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