Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Standards

Reply
Thread Tools

Standards

 
 
Ian Tuomi
Guest
Posts: n/a
 
      10-17-2003
Hello. I have been reading about all the different standards in C and I
am quite confused, and have a few questions. ()

How is C99 "better" than older versions of C? (or is it?)
What is the "official" C definition nowadays? C99?
What standard does K&R 2nd edition describe?
Where can I get a book that has the latest(or best) standard?
What is the most used standard?

What books should every C programmer have? (I allready have K&R 2)

--
Ian Tuomi
Jyväskylä, Finland

"Very funny scotty, now beam down my clothes."

NOTE: Remove NOSPAM from address

 
Reply With Quote
 
 
 
 
Noah Roberts
Guest
Posts: n/a
 
      10-17-2003
Ian Tuomi wrote:
> Hello. I have been reading about all the different standards in C and I
> am quite confused, and have a few questions. ()
>
> How is C99 "better" than older versions of C? (or is it?)
> What is the "official" C definition nowadays? C99?


I think so, but I loose track

> What standard does K&R 2nd edition describe?


ansi

> Where can I get a book that has the latest(or best) standard?
> What is the most used standard?
>
> What books should every C programmer have? (I allready have K&R 2)
>

That should do you good for the language itself, no other book I have
seen compares adiquately.

Besides that you will want something specific to certain areas of
programming, for instance you might want a Unix programmer book or
something on game programming....depending on your area of interest.
Standard C will not get you very far, you need to break away from
"stardand C" and learn other standards, like POSIX or OpenGL, to become
effective. Since this is such a wide topic I can't recommend anything,
you will want to go to a programmer group in your area of interest and
ask about good books there.

--
Noah Roberts
- "If you are not outraged, you are not paying attention."

 
Reply With Quote
 
 
 
 
Jeremy Yallop
Guest
Posts: n/a
 
      10-17-2003
Ian Tuomi wrote:
> What is the "official" C definition nowadays? C99?


Yes, C99, otherwise known as ISO/IEC 9899:1999. There have also been
a couple of (very minor) updates since C99 came out.

> What standard does K&R 2nd edition describe?


K&R was written shortly before C89 was released. With some small
exceptions, it describes C89.

> Where can I get a book that has the latest(or best) standard?


C99 is available in electronic form from http://webstore.ansi.org and
in book form, ISBN 0470845732 (e.g. from <URL:
http://www.compman.co.uk/cgi-win/browse.exe?ref=530551> ).

> What is the most used standard?


C89 is very widely implemented. There are very few conforming C99
implementations at the moment, although an increasing number of
vendors are adding at least some of the new features.

Jeremy.
 
Reply With Quote
 
Irrwahn Grausewitz
Guest
Posts: n/a
 
      10-17-2003
Ian Tuomi <(E-Mail Removed)> wrote:

>Hello. I have been reading about all the different standards in C and I
>am quite confused, and have a few questions. ()
>
>How is C99 "better" than older versions of C? (or is it?)


That's a list of changes, taken from the current standard itself:

[...] Major changes from the previous edition include:

— restricted character set support via digraphs and <iso646.h>
(originally specified in AMD1)
— wide character library support in <wchar.h> and <wctype.h> (originally
specified in AMD1)
— more precise aliasing rules via effective type
— restricted pointers
— variable-length arrays
— flexible array members
— static and type qualifiers in parameter array declarators
— complex (and imaginary) support in <complex.h>
— type-generic math macros in <tgmath.h>
— the long long int type and library functions
— increased minimum translation limits
— additional floating-point characteristics in <float.h>
— remove implicit int
— reliable integer division
— universal character names (\u and \U)
— extended identifiers
— hexadecimal floating-point constants and %a and %A printf/scanf
conversion specifiers
— compound literals
— designated initializers
— // comments
— extended integer types and library functions in <inttypes.h> and
<stdint.h>
— remove implicit function declaration
— preprocessor arithmetic done in intmax_t/uintmax_t
— mixed declarations and code
— new block scopes for selection and iteration statements
— integer constant type rules
— integer promotion rules
— macros with a variable number of arguments
— the vscanf family of functions in <stdio.h> and <wchar.h>
— additional math library functions in <math.h>
— floating-point environment access in <fenv.h>
— IEC 60559 (also known as IEC 559 or IEEE arithmetic) support
— trailing comma allowed in enum declaration
— %lf conversion specifier allowed in printf
— inline functions
— the snprintf family of functions in <stdio.h>
— boolean type in <stdbool.h>
— idempotent type qualifiers
— empty macro arguments
— new struct type compatibility rules (tag compatibility)
— additional predefined macro names
— _Pragma preprocessing operator
— standard pragmas
— _ _func_ _ predefined identifier
— VA_COPY macro
— additional strftime conversion specifiers
— LIA compatibility annex
— deprecate ungetc at the beginning of a binary file
— remove deprecation of aliased array parameters
— conversion of array to pointer not limited to lvalues
— relaxed constraints on aggregate and union initialization
— relaxed restrictions on portable header names
— return without expression not permitted in function that returns a
value (and vice versa)


>What is the "official" C definition nowadays? C99?


ISO/IEC 9899:1999, short C99


>What standard does K&R 2nd edition describe?


It is based on a draft version of ANSI C89.


>Where can I get a book that has the latest(or best) standard?


The standard itself, of course:

The C Standard
by British Standards Institute
Published by John Wiley & Sons Ltd
750+ pages
ISBN 0-470-84573-2

I paid 55,- EUR at my local book store. It's worth it.

Also available as PDF document, you should be able to find the order
form via http://www.dkuug.dk/JTC1/SC22/WG14/.


>What is the most used standard?


Currently C89/C90, as of now there are only few (no?) fully conforming
implementations of C99.

>What books should every C programmer have? (I allready have K&R 2)


K&R2 will do fine, especially when accompanied by the standard itself.
You can find more recommendations in Section 20 of the c.l.c-faq,
residing at http://www.eskimo.com/~scs/C-faq/top.html .

HTH

Regards
--
Irrwahn
((E-Mail Removed))
 
Reply With Quote
 
Dave Vandervies
Guest
Posts: n/a
 
      10-17-2003
In article <bmp00l$l10$(E-Mail Removed)>,
Ian Tuomi <(E-Mail Removed)> wrote:
>Hello. I have been reading about all the different standards in C and I
>am quite confused, and have a few questions. ()
>
>How is C99 "better" than older versions of C? (or is it?)


It adds some features to the language that may be useful. Whether they
are in fact useful for what you want to do, combined with considerations
like availability of implementations (which will improve as time goes on),
determines whether it is in fact "better".


>What is the "official" C definition nowadays? C99?


C99 (properly known as "ANSI/ISO/IEC 9899:1999", if I've gotten the order
of the organization-name TLAs in the name correct) is the most recent
formal definition and probably has the best claim to being "official".
C90 (9899:1990) is probably more useful to you as a programmer, since
it's the one that most of the implementations you'll use and most of
the code you'll work with were written for.


>What standard does K&R 2nd edition describe?


C90, with a few "errors" in things that were changed between the late
drafts of the standard (which the first printing of the book was based
on) and the final version and that were missed in the update to the book.
(If you manage to find a first printing of K&R2, it in fact describes
late-draft C89. I would assume that these are fairly rare, especially
if you're buying your copy new.)


>Where can I get a book that has the latest(or best) standard?


You can get C99 in electronic format from a few different standards
organizations as well as in book form, as other posters have noted.


>What is the most used standard?


C90, often (but not anywhere near universally) used with extra extensions
to handle things like networking and graphics that the C standard
doesn't define.


>What books should every C programmer have? (I allready have K&R 2)


K&R2 and a copy of the standard (either electronic or hard-copy) are
about the only C-specific books you'll need.

Besides language references, every programmer's library should include:
-General books on programming - Knuth is the canonical "If you're *really*
serious about it, you should get this one" book, but you'll probably
also want to get something a little bit more cookbook-ish for when
you don't have the time or energy to work through the theory behind
something. There are a lot of good books that discuss algorithms,
data structures, and program design; one or two of these will be
Very Helpful.
-References on any APIs you'll be using. A good Unix book if you're
writing Unix programs, a good Windows book if you're writing Windows
programs, a good network programming book if you're writing programs
that talk to a network, a good OpenGL book if you're using OpenGL... you
get the idea.

If you're working in a cold office, something like C for Dummies or
anything by Schildt might also be useful - if you get too cold, you can
always burn a few pages from them to keep warm.


dave

--
Dave Vandervies http://www.velocityreviews.com/forums/(E-Mail Removed)
Perhaps you should reflect on the fact that books are seldom sold by the
kilogram.
--Kevin Easton in comp.lang.c
 
Reply With Quote
 
Darrell Grainger
Guest
Posts: n/a
 
      10-18-2003
On Fri, 17 Oct 2003, Ian Tuomi wrote:

> Hello. I have been reading about all the different standards in C and I
> am quite confused, and have a few questions. ()
>
> How is C99 "better" than older versions of C? (or is it?)


A new standard is usually a response to people being dissatisfied with the
old standard. To some people the C99 standard might not be considered
"better" or to people who did not like features of the old standard they
might appreciate the changes in C99.

> What is the "official" C definition nowadays? C99?


Not sure what you mean by "official". A lot of compilers are still using
the old standard. So does "official" mean the most widely available? Or
does it mean the last update to the standard?

> What standard does K&R 2nd edition describe?


K&R 2nd edition was created before 1999 so it would be for the older
standard.

> Where can I get a book that has the latest(or best) standard?


The standard can be purchased online from ISO at http://www.iso.ch/. Enter
the web site and look for a link to the ISO Store.

> What is the most used standard?


I believe the most used C standard is the ISO/IEC 9899:1990 (or ANSI
9899:1989) since compilers which support 9899:1999 are harder to find.

> What books should every C programmer have? (I allready have K&R 2)


A copy of the standard would be the next step.

> --
> Ian Tuomi
> Jyväskylä, Finland
>
> "Very funny scotty, now beam down my clothes."
>
> NOTE: Remove NOSPAM from address
>
>


--
Send e-mail to: darrell at cs dot toronto dot edu
Don't send e-mail to (E-Mail Removed)
 
Reply With Quote
 
Irrwahn Grausewitz
Guest
Posts: n/a
 
      10-18-2003
Irrwahn Grausewitz <(E-Mail Removed)> wrote:

Ian Tuomi <(E-Mail Removed)> wrote:
<snip>
>>What standard does K&R 2nd edition describe?

>
>It is based on a draft version of ANSI C89.


I wonder nobody has objected to this.

K&R1 is based on a late draft of C89.
K&R2 is based on final C89.
--
Irrwahn
((E-Mail Removed))
 
Reply With Quote
 
Jeremy Yallop
Guest
Posts: n/a
 
      10-18-2003
Irrwahn Grausewitz wrote:
> Irrwahn Grausewitz <(E-Mail Removed)> wrote:
>
> Ian Tuomi <(E-Mail Removed)> wrote:
><snip>
>>>What standard does K&R 2nd edition describe?

>>
>>It is based on a draft version of ANSI C89.

>
> I wonder nobody has objected to this.


Nobody objected because it's correct.

> K&R1 is based on a late draft of C89.
> K&R2 is based on final C89.


Nope. K&R1 was published in 1978. The ANSI standardisation process
for C began in 1983. K&R2 was published in 1988 and the first ANSI C
standard was published at the end of the following year.

Jeremy.
 
Reply With Quote
 
Irrwahn Grausewitz
Guest
Posts: n/a
 
      10-18-2003
Jeremy Yallop <(E-Mail Removed)> wrote:

>Irrwahn Grausewitz wrote:
>> Irrwahn Grausewitz <(E-Mail Removed)> wrote:
>>
>> Ian Tuomi <(E-Mail Removed)> wrote:
>><snip>
>>>>What standard does K&R 2nd edition describe?
>>>
>>>It is based on a draft version of ANSI C89.

>>
>> I wonder nobody has objected to this.

>
>Nobody objected because it's correct.
>
>> K&R1 is based on a late draft of C89.
>> K&R2 is based on final C89.

>
>Nope. K&R1 was published in 1978. The ANSI standardisation process
>for C began in 1983. K&R2 was published in 1988 and the first ANSI C
>standard was published at the end of the following year.


Oh boy, now I've miscorrected my own post. <sigh>
Thanks for re-correction.
--
Irrwahn,
insert coin to engage my brain.
--
Irrwahn
((E-Mail Removed))
 
Reply With Quote
 
Dan Pop
Guest
Posts: n/a
 
      10-20-2003
In <bmp406$pl413$(E-Mail Removed)-berlin.de> Jeremy Yallop <(E-Mail Removed)> writes:

>Ian Tuomi wrote:
>> What is the "official" C definition nowadays? C99?

>
>Yes, C99, otherwise known as ISO/IEC 9899:1999. There have also been
>a couple of (very minor) updates since C99 came out.

^^^^^^^^^^^
I'm only aware of TC1. What am I missing?

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: (E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FRS standards / Atchitecture Design of a System SMG ASP .Net 0 07-28-2004 05:19 AM
Evolving Web App Standards and ASP.NET =?Utf-8?B?bWtsYXBw?= ASP .Net 4 07-20-2004 07:52 AM
asp.net and Web Accessibility Standards Paul G ASP .Net 1 02-26-2004 10:26 PM
coding standards Jim Culver ASP .Net 4 09-18-2003 02:59 AM
coding standards shbgupta ASP .Net 2 06-27-2003 08:48 AM



Advertisments