From 7102969092937984394
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,1a6b16794da06105
X-Google-Attributes: gidf78e5,public
From: David R Tribble <david@tribble.com>
Subject: Re: integer types
Date: 2000/06/30
Message-ID: <395B7090.ACCA92B5@tribble.com>#1/1
X-Deja-AN: 640457477
Content-Transfer-Encoding: 7bit
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
References: <8jb3kt$1kig$1@news.hal-pc.org> <Pine.OSF.4.10.10006281253380.31671-100000@cassius.its.unimelb.edu.au> <395A1806.A4223951@sensor.com>
X-Accept-Language: en
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Trace: mail2news.demon.co.uk 962296608 mail2news:12501 mail2news mail2news.demon.co.uk
Organization: The Vast Right-Wing Conspiracy
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
MIME-Version: 1.0
NNTP-Posting-Date: Thu, 29 Jun 2000 10:55:02 CDT
Newsgroups: comp.std.c++

Ron Natalie wrote:
> The standard doesn't require an 8 bit type.  It doesn't require a 16
> bit type.  It doesn't require a 32 bit type.

If you mean "require an exact 8-bit type", etc., yes, you are correct.

> The only requirement is that there is a type at least 16 bits and
> that the progression of char, short, int, long gives you types that
> are either the same or greater in size each step.

This implies that all the integer types could be 16 bits wide, which
is incorrect.

The requirements are that:
 - 'char'   must hold at least 8 bits
 - 'short'  must hold at least 16 bits
 - 'int'    must hold at least 16 bits
 - 'long'   must hold at least 32 bits
 - 'float'  must hold at least 6 (decimal) digits
 - 'double' must hold at least 10 (decimal) digits

The ISO C++ requirements are borrowed from the ISO C requirements,
in ANSI/ISO 9899-1990, 5.2.4.2.

--
David R. Tribble, mailto:david@tribble.com, http://david.tribble.com

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




