How do the experts here quickly come up with references to standards?

K

Kobu

Hello,

I really admire how the experts that roam clc quickly come up with
specific references to parts of C standard documentation. It beats
textbooks anyday because it leaves everyone with less doubt.

My question is, how do you people do it? Do most of you have hardcopy
versions of the standards or browse online versions? Are most of you
already familiar with the language standards enough to quickly find
what's needed (much like an experienced CPA/CA looking at Accounting
Standards). Would you recommend that an intermediate level C programmer
read these standards straight through?
 
C

CBFalconer

Kobu said:
I really admire how the experts that roam clc quickly come up with
specific references to parts of C standard documentation. It beats
textbooks anyday because it leaves everyone with less doubt.

My question is, how do you people do it? Do most of you have hardcopy
versions of the standards or browse online versions? Are most of you
already familiar with the language standards enough to quickly find
what's needed (much like an experienced CPA/CA looking at Accounting
Standards). Would you recommend that an intermediate level C programmer
read these standards straight through?

See the C99 reference in my sig below. Get the .txt version.

--
Some useful references:
<http://www.ungerhu.com/jxh/clc.welcome.txt>
<http://www.eskimo.com/~scs/C-faq/top.html>
<http://benpfaff.org/writings/clc/off-topic.html>
<http://anubis.dkuug.dk/jtc1/sc22/wg14/www/docs/n869/> (C99)
<http://www.dinkumware.com/refxc.html> C-library
 
J

Jonathan Burd

Kobu said:
Hello,

I really admire how the experts that roam clc quickly come up with
specific references to parts of C standard documentation. It beats
textbooks anyday because it leaves everyone with less doubt.

My question is, how do you people do it? Do most of you have hardcopy
[...]

In addition to the n869.txt file, get (e)grep if it is available for
your operating system. You can find one for Windows here:
http://unxutils.sourceforge.net ;)

--
C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
C Library: http://www.dinkumware.com/refxc.html
C99 Standard Draft: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n869/
Common C Programming Errors:
http://www.drpaulcarter.com/cs/common-c-errors.php

"I'm learning to program because then I can write
programs to do my homework faster." - Andy Anfilofieff
 
C

Christian Kandeler

Keith said:
I have a PDF copy of the C99 standard (which I bought from ANSI for
$18)

I keep reading about the standard being available for $18, but every store I
checked wants $220 for it. Am I missing something or have they raised the
price?


Christian
 
C

Chris Croughton

I have a PDF copy of the C99 standard (which I bought from ANSI for
$18) on my laptop, just a few keystrokes away from my newsreader.
It's well bookmarked, so it's easy to find whatever section I need.
I suspect a lot of the regulars have something similar.

I don't use the bookmarks, the search (CTRL-F) seems to work well enough
for me (Acrobat 6 puts up a pane with a scrollable list of all of the
found strings, which makes it easy to go through and see the context).

There is also a copy of a late C89 Draft at

http://dev.unicals.com/papers/c89-draft.html

(someone posted it recently either here or comp.std.c and I snarfed the
reference). It's one big HTML file, and the conversion to HTML leaves
something to be desired (at least one of the indices has no line
breaks!) but it's the only easily available copy of the C89 standard
I've found.
I don't know about reading it straight through, but it's cheap enough
that it's worth having as a reference -- especially if you want to
crush your fellow programmers' spirits with your detailed knowledge of
the language.

In my opinion it is well worth the money, but it isn't a tutorial. It's
great for finding things which I remember partially ("what was that new
printf specification for displaying floating point in hex?") but I've
had to ask here (or c.s.c) for clarification of what some of the things
actually mean.

I certainly wouldn't try to read it straight through, unless I really
couldn't sleep <g>. The same with any reference standard, they aren't
designed to be read that way. A number of things are scattered into
many sections (the attributes of integer types, for instance, appear in
different sections including several for the headers which are listed in
alphabetical order). And like a lot of reference documents
(dictionaries for instance) I find that I'm looking at one thing and I
get sidetracked by references to other parts...

Chris C
 
C

Chris Croughton

I keep reading about the standard being available for $18, but every store I
checked wants $220 for it. Am I missing something or have they raised the
price?

You're missing "PDF", it's an online copy, the dead tree versions are
the expensive ones. If you go to http://webstore.ansi.org/ansidocstore/
and search for 9899 you will find the page, which list prices:

DIN EN 29899 Programming $183.00
languages; C;
(ISO/IEC
9899:1990);
English version EN
29899:1993
(FOREIGN STANDARD)

DIN EN Programming $121.00
29899/A1 languages - C -
Amendment 1: C
integrity (ISO/IEC
9899:1990/AMD
1:1995); English
version EN
29899:1993/A1:1996
(FOREIGN STANDARD)

INCITS/ISO/IEC Approved American $18.00
9899-1999 National Standard
Programming
Languages - C
(formerly
ANSI/ISO/IEC
9899-1999)

ISO/IEC Programming $0.00
9899/Cor1:2001 languages - C -
Corrigendum
FREE

ISO/IEC Programming $0.00
9899/Cor2:2004 languages - C -
Corrigendum
FREE

ISO/IEC Programming $278.00
9899:1999 languages -- C

The third is the PDF version. The two Corrigenda are also PDF only.
All of the rest are dead tree versions (DIN is the German standard;
there is also an expensive British Standard version which the ANSI store
doesn't stock, and probably other national standards have their own).

INCITS is what used to be ANSI, I gather (I lose track of these acronym
changes)...

There is at least one other online store which sells it, slightly
different prices for the dead tree versions but the same for the PDF
copies.

Chris C
 
C

Christian Kandeler

Chris said:
You're missing "PDF", it's an online copy, the dead tree versions are
the expensive ones.
If you go to http://webstore.ansi.org/ansidocstore/
and search for 9899 you will find the page, which list prices

Hm, seems that you're right. It's just that I've searched numerous sites
(including, I could swear, the one you mention) just a couple of days ago,
and they all wanted the same amount of money for the PDF and the paper
version. Wait a second... here's one:
http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=29237&ICS1=35&ICS2=60&ICS3=
They sell the standard for 340 Swiss Francs, regardless of the medium.


Christian
 
R

Richard Bos

Chris Croughton said:
You're missing "PDF", it's an online copy, the dead tree versions are
the expensive ones. If you go to http://webstore.ansi.org/ansidocstore/
and search for 9899 you will find the page, which list prices:

DIN EN 29899 Programming $183.00
languages; C;
DIN EN Programming $121.00
29899/A1 languages - C -
Amendment 1: C
INCITS/ISO/IEC Approved American $18.00
9899-1999 National Standard
The third is the PDF version. The two Corrigenda are also PDF only.
All of the rest are dead tree versions (DIN is the German standard;
there is also an expensive British Standard version which the ANSI store
doesn't stock, and probably other national standards have their own).

And if you do want a dead tree edition,
<http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470845732.html> is
not from a Standards institute directly, but it's the official text, and
a lot cheaper. Well worth the money, IMO.

Richard
 
C

Chris Croughton

Hm, seems that you're right. It's just that I've searched numerous sites
(including, I could swear, the one you mention) just a couple of days ago,
and they all wanted the same amount of money for the PDF and the paper
version. Wait a second... here's one:
http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=29237&ICS1=35&ICS2=60&ICS3=
They sell the standard for 340 Swiss Francs, regardless of the medium.

Probably BS do as well, they are in it for the profit. Bastards. Get
it from ANSI...

Note that http://www.open-std.org/jtc1/sc22/wg14/ has the Rationale
(2003) for the C spec. Also, the PDF itself can currently be found
(free!) as http://www.open-std.org/jtc1/sc22/open/n2794/n2794.pdf and as
text.

Chris C
 
K

Keith Thompson

Chris Croughton said:
INCITS is what used to be ANSI, I gather (I lose track of these acronym
changes)...

No, INCITS is the InterNational Committee for Information Technology
Standards, <http://www.incits.org/>. Apparently it's tne new name for
X3; the name was changed in 1996. INCITS is sponsored by ITI, the
Information Technology Industry Council, <http://www.itic.org/>,
formerly CBEMA (Computer and Business Equipment Asssociation).

"I know engineers, they just *love* to change things."
-- Dr. Leonard McCoy
 
C

CBFalconer

Chris said:
.... snip ...

There is also a copy of a late C89 Draft at

http://dev.unicals.com/papers/c89-draft.html

(someone posted it recently either here or comp.std.c and I snarfed
the reference). It's one big HTML file, and the conversion to HTML
leaves something to be desired (at least one of the indices has no
line breaks!) but it's the only easily available copy of the C89
standard I've found.

ansic89.txt 494130 ANSI C standard, last draft.

<http://home.earthlink.net/~bobbitts/c89.txt>
or <http://cern.ch/dan.pop/ansi.c>

I believe that copy has a hole somewhere.
 
M

Mike Wahler

Kobu said:
Hello,

I really admire how the experts that roam clc quickly come up with
specific references to parts of C standard documentation. It beats
textbooks anyday because it leaves everyone with less doubt.

Yes. Many textbooks have errors (but many also have
companion 'errata' sites on the web). And then there's
Herb. :)
My question is, how do you people do it? Do most of you have hardcopy
versions of the standards or browse online versions?

The C standard is not (legally) publicly available for free,
it must be purchased. It's available as hard copy or
as a .PDF file (the latter is much less expensive).

I find things by using the Adobe Acrobat search feature,
giving it selected keywords (but this does take practice,
and gets easier once one becomes familiar with its
organization, writing 'style' and terminology used).
Are most of you
already familiar with the language standards enough to quickly find
what's needed (much like an experienced CPA/CA looking at Accounting
Standards).

When I first got my copy of the standard I was not familiar with
it at all. But experience with it makes using it easier with each
use (just as with your CPA analogy). And of course, as with anything,
those issues most commonly dealt with get added to the category of
'memorized'.
Would you recommend that an intermediate level C programmer
read these standards straight through?

I would not recommend anyone with any level of expertise read
it 'front to back' like a book. It's intended as a reference,
as it's not organized as a textbook would be (i.e. information
in a particular portion isn't necessarily built upon that
of previous sections -- it does use 'forward references' as
an aid to the reader, however).

I would recommend that an intermediate level (or any professional)
C coder does own a copy of the standard. It's only about 20USD for
a .PDF copy available from www.webstore.ansi.org. Search for
"9899:1999".

Finally, an organization employing several coders might provide
a copy of the standard for them to share. Even if this were
the case for me, I prefer to have my own personal copy.

HTH,
-Mike
 
D

Default User

Mike said:
The C standard is not (legally) publicly available for free,
it must be purchased. It's available as hard copy or
as a .PDF file (the latter is much less expensive).

While it doesn't help me for C, my company recently purchased some sort
of site license for the C++ standard, so they can have the PDF of the
2003 update to that on an internal tools web site. Very handy.

I'm a member of the user group that works with the tools people, I'll
have to ask how much that license cost. More than $18 I'll bet.

Brian
 
C

Chris Croughton

Curious: What tool did you use for that?

Acrobat, tell it to save as a text file!

There is a GNU too pdftotext as well, but I've found that it fails on a
number of PDF files (I believe it uses ghostscript).

Chris C
 
M

Mike Wahler

Chris Croughton said:
Acrobat, tell it to save as a text file!

That was my first instinct, but alas, by copy does not
allow doing so.
There is a GNU too pdftotext as well, but I've found that it fails on a
number of PDF files (I believe it uses ghostscript).

Thanks for your suggestions.

-Mike
 
L

lawrence.jones

Chris Croughton said:
INCITS is what used to be ANSI, I gather (I lose track of these acronym
changes)...

Actually, INCITS is what was briefly known as NCITS and before that was
Accredited Standards Committee X3, Information Technology. ANSI is who
accredited it, and who delegates responsibility for IT standards to it.

-Larry Jones

Girls are like slugs -- they probably serve some purpose, but
it's hard to imagine what. -- Calvin
 
C

Chris Croughton

That was my first instinct, but alas, by copy does not
allow doing so.

Ah, version 6 on Windows (at least) does allow that (with the C spec.
anyway, there are other PDF files with embedded graphics which it can't
save as text).
Thanks for your suggestions.

You can also try pdf2ps and ps2ascii, that sometimes works better (or
worse) than pdftotext. Somewhere I've seen a pdf to HTLM converter but
it doesn't seem to be on my system...

Chris C
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top