standard reference manual

  • Thread starter E. Robert Tisdale
  • Start date
E

E. Robert Tisdale

I am a long time subscriber to the comp.lang.c newsgroup.
Recently (over the last few years), comp.lang.c subscribers
have been citing and quoting ANSI/ISO C standards documents
to support their interpretation of the standards.
Evidently, they are using the standards documents
as sort of a "programmers' reference manual".
Personally, I find that the standards documents
are difficult to read, understand and interpret.
I feel compelled to consult the comp.std.c newsgroup
for their interpretation of the standards documents.

Were the standards documents intended to be used
as a reference manual by ordinary programmers?
Or were they mainly intended for use by compiler developers?
Is there any hope that the standards documents can be revised
to make them more useful to ordinary C programmers?
Are there other documents that C programmers should use
as a reference besides or instead of the standards documents?
 
J

James Kuyper

:
....
Were the standards documents intended to be used
as a reference manual by ordinary programmers?
Or were they mainly intended for use by compiler developers?

They were intended for use both by developers interested in writing code
that can be ported to any conforming implementation, and by implementors
interested in writing conforming implementations. However, as is usually
the case when trying to serve two different goals, it serves neither one
as well as it would if the other goal could be ignored. I'd say it's
biased in favor of giving implementors what they need, leaving
developers to rely on third-party books for more readible descriptions
of C. However, implementors might feel differently about that.
 
L

lawrence.jones

In comp.std.c E. Robert Tisdale said:
Were the standards documents intended to be used
as a reference manual by ordinary programmers?

Yes. I don't recommend it as casual reading (the plot and character
development leave a lot to be desired), but the committee tried very
hard to ensure that it would be accessible to the average (professional)
programmer.

-Larry Jones

I keep forgetting that rules are only for little nice people. -- Calvin
 
B

Ben Pfaff

Yes. I don't recommend it as casual reading (the plot and character
development leave a lot to be desired), but the committee tried very
hard to ensure that it would be accessible to the average (professional)
programmer.

I use the standard as my primary C reference manual, and I
suspect that many others regulars in clc do so as well.
 
D

Douglas A. Gwyn

E. Robert Tisdale said:
Were the standards documents intended to be used
as a reference manual by ordinary programmers?

As a reference, yes, but as a tutorial, no.
 
R

Richard Bos

Yes. I don't recommend it as casual reading (the plot and character
development leave a lot to be desired), but the committee tried very
hard to ensure that it would be accessible to the average (professional)
programmer.

And for the greater part, it has succeeded, IMO.

Richard
 
E

Eric Smith

Yes. I don't recommend it as casual reading (the plot and character
development leave a lot to be desired),

Some technical documents do have quite good character development, though.
For instance, Volume E of Donald E. Knuth's _Computers & Typesetting_.
 
D

Dan Pop

In said:
Were the standards documents intended to be used
as a reference manual by ordinary programmers?
Or were they mainly intended for use by compiler developers?

Footnote 1 provides the answers:

1) This International Standard is designed to promote the
portability of C programs among a variety of data-processing
systems. It is intended for use by implementors and
programmers.

Dan
 
D

Dan Pop

In said:
In this case, I recommend the book<C: A Reference Manual, Fifth Edition>
and the link http://www.careferencemanual.com/.

In my private view, this book is very helpful for you to understand C99.

Provided that its authors managed to understand the C99 standard.
Previous editions provided enough evidence that they missed some of the
finer points of C89...

Dan
 
T

those who know me have no need of my name

in comp.lang.c i read:
In <[email protected]> "Xiangliang Meng"


Provided that its authors managed to understand the C99 standard.
Previous editions provided enough evidence that they missed some of the
finer points of C89...

they have an errata web page and accept public submissions.
 
R

rohit

Provided that its authors managed to understand the C99 standard.
Previous editions provided enough evidence that they missed some of the
finer points of C89...
how can we know that our compiler is in conformance of C89 or any
other standard.Is there a option/flag(like gcc -v gives the compiler
version) that says to which standard the compiler conforms to.

regards
rohit
 
A

Antoine Leca

En (e-mail address removed), rohit va escriure:
how can we know that our compiler is in conformance of C89

If a compiler claims conformance to the C standard, one of its requisites is
to come accompanied by a documentation. Which will tell you this kind of
things (and much more).

So there is even less excuses to RTFM ;-).


Antoine
 
D

Dan Pop

In said:
in comp.lang.c i read:

they have an errata web page and accept public submissions.

Which is of precious little help to the people willing to learn C99 from
their book: they're not supposed to be able to find the bugs in the book
and those who already know C99 are not supposed to read a less
authoritative book on the same topic.

Dan
 
J

James Kuyper

how can we know that our compiler is in conformance of C89 or any
other standard.Is there a option/flag(like gcc -v gives the compiler
version) that says to which standard the compiler conforms to.

It's possible to find out whether the implementors claim that a
compiler conforms, by checking the documentation. That documentation
should also tell you what options you need to invoke to put your
compiler into conforming mode; the default mode is almost never fully
conforming. The "-ansi" option puts many compilers into a mode that
conforms to C89, or at least comes close to conforming. There's less
agreement about how to put compilers into conformance with the C99
standard.

However, it's impossible to know for certain that a compiler actuall
does conform to C89 (or C99). It's possible to test for
non-conformance by using various test suites. However, passing those
tests does not confirm conformance; no finite number of test cases can
cover every possible way an implementation can be non-conforming.
Also, a key component of a conforming implmentation is the
implementations documentation of those things the standard requires
each implementation to define. That document will be in some natural
language; as a result, automated testing is impossible with current
technology. Basically, it must be read by a human expert, who will try
to judge whether the implementors have adequately defined everything
they're required to define. Inherently, that will be a judgement call.

In other words, there is no royal road to determining conformance. The
simplest approach is to hope that when implementors claim that their
implementations are conforming, they're telling the truth, and to
complain about non-conformance if and when we detect it.
 
X

Xiangliang Meng

Do you consider reading the C99 standard is the only way? Or would you like
to give more advice?

I guess there are many people want to master C across the world.

Thank you.

Regards,

Xiangliang Meng
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,264
Messages
2,571,065
Members
48,770
Latest member
ElysaD

Latest Threads

Top