[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: not enough real programmers? (was Re: Byte Magazine: 18 Vintage issues, 1985-1986)



On Fri, 20 Aug 1999 16:19:59 GMT, in <37be7e34.626050@news.pandora.be>
lucvdv@null.net (Luc Van der Veken) wrote:

>I've been searching too, but it seems like the official standard
>can't be found on the web.  Is that because the ANSI committee
>copyrighted the text and charges for copies?

Yes. However, a useful tip is that the /draft/ standards are freely
distributed, and usually the final draft is identical to the standard
except for typographical details.

Try a web search for n2620.pdf, which is the name of the C standard
final draft that I've got. 

This is what it says on limits:

1 The contents of a header <limits.h> are given below, in alphabetic
order. The minimum magnitudes shown shall be replaced by
implementation-defined magnitudes with the same sign. The values shall
all be constant expressions suitable for use in #if preprocessing
directives. The components are described further in 5.2.4.2.1.

#define CHAR_BIT	8
#define CHAR_MAX	UCHAR_MAX or SCHAR_MAX
#define CHAR_MIN	0 or SCHAR_MIN
#define INT_MAX	+32767
#define INT_MIN		-32767
#define LONG_MAX	+2147483647
#define LONG_MIN	-2147483647
#define LLONG_MAX	+9223372036854775807
#define LLONG_MIN	-9223372036854775807
#define MB_LEN_MAX	1
#define SCHAR_MAX	+127
#define SCHAR_MIN	-127
#define SHRT_MAX	+32767
#define SHRT_MIN	-32767
#define UCHAR_MAX	255
#define USHRT_MAX	65535
#define UINT_MAX	65535
#define ULONG_MAX	4294967295
#define ULLONG_MAX	18446744073709551615

This, as has been noted by others, is /not/ the same as K&R.
--
Steve Rencontre, Design Consultant
http://www.rsn-tech.demon.co.uk/  --  remember to despam return address