getting started 
Author Message
 getting started

I'm going to have to teach my self C for my research work, so
I`d like to know what is a good book to learn from, and what is
a good compiler to buy. I'll be learning on an I.B.M. PS/2,
although I'll eventually be using the "MPW" C on Mac.
Thanks in advance for any help.




Sat, 10 Jul 1993 10:04:49 GMT  
 getting started

Quote:
Lloyd Williams writes:
>I'm going to have to teach my self C for my research work, so
>I`d like to know what is a good book to learn from, and what is
>a good compiler to buy. I'll be learning on an I.B.M. PS/2,
>although I'll eventually be using the "MPW" C on Mac.
>Thanks in advance for any help.

It's been said before, and I'll say it again... get the original
"white book."  Better still, buy the update.  _The_C_Programming_Language_
is still a classic.  As long as you already are familiar with some
other third-generation language, you will find this the most
useful beginning.  Authors of the first edition circa 1980 were
Kerninghan & Ritchie.  Authors of second edition are ?????.
--
============================================================
Mark W. Schumann  3111 Mapledale Avenue, Cleveland 44109 USA

UUCP:   ...!mailrus!usenet.ins.cwru.edu!ncoast!catfood


Sun, 11 Jul 1993 10:26:39 GMT  
 getting started

Quote:
>It's been said before, and I'll say it again... get the original
>"white book."  Better still, buy the update.  _The_C_Programming_Language_
>is still a classic.  As long as you already are familiar with some
>other third-generation language, you will find this the most
>useful beginning.  Authors of the first edition circa 1980 were
>Kerninghan & Ritchie.  Authors of second edition are ?????.

Still by Brian Kernighan and Dennis Ritchie, published by Prentice-Hall,
ISBN 0-13-110362-8.  I agree that this is the best introduction for
programmers with previous experience in fortran, Pascal, or a similar
language.  It is probably not the best C tutorial for a programming
novice (but that wasn't the situation here).  The Second Edition of
"The C Programming Language" has had numerous changes from the first on
practically every page, and is recommended over the First Edition (which
unfortunately seems to be the one mostly stocked by bookstores) for all
purposes other than access to Appendix A for the specifications for
so-called "K&R C".  The Second Edition explains where ANSI/ISO C and
"K&R C" differ, so it can be used to learn C no matter which flavor of C
one has access to; however, the code examples do assume ANSI/ISO C.

Dennis posted an errata sheet for the Second Edition some time ago; I
don't know whether or not current printings include these corrections.
They were relatively minor, though.



Mon, 12 Jul 1993 07:01:12 GMT  
 getting started

Quote:
>Dennis posted an errata sheet for the Second Edition some time ago; I
>don't know whether or not current printings include these corrections.
>They were relatively minor, though.

The revised Second Edition (the one with the "ANSI C" stamp on the
cover) does indeed include the corrections. Some of them are not so
minor, however (e.g., initialisation of automatic structs...)

--

Faculty of Mathematics and Computer Science     UUCP: uunet!cs.kun.nl!lwj
University of Nijmegen, the Netherlands         tel. +3180652271



Mon, 12 Jul 1993 21:39:59 GMT  
 getting started
Luc> The revised Second Edition (the one with the "ANSI C" stamp on the
Luc> cover) does indeed include the corrections. Some of them are not so
Luc> minor, however (e.g., initialisation of automatic structs...)

  I remember having compared the "draft-proposed ANSI" to the "real"
ANSI, when it was published. As I browsed the two, I could find no
differences at all: they had the exact same length and everywhere I
looked, the text was positioned at exactly the same positions (yes, in
app A too). Even the two prefaces (?) mentions (in exact same words),
that this isn't the "final standard, as we still have to wait for
ANSI" (I can't quote it; I've got both K&R2 + a copy and a copy of
K&R1 but they've all been borrowed from me at the moment).

  I know, that this isn't a fulfilling diff, but I'm lead to believe
they are completely alike. Could somebody point out the differences?
[he says, knowing that in case of them being different, he can be d*mn
sure everybody will point it out ;-)]

  Richard
--
/Richard Flamsholt



Tue, 13 Jul 1993 02:55:38 GMT  
 getting started

Quote:


>>Authors of the first edition circa 1980 were
>>Kerninghan & Ritchie.  Authors of second edition are ?????.

>Still by Brian Kernighan and Dennis Ritchie, published by Prentice-Hall,
>ISBN 0-13-110362-8.

>Dennis posted an errata sheet for the Second Edition some time ago; I
>don't know whether or not current printings include these corrections.
>They were relatively minor, though.

Well through a comedy of errors, my original copy of the Second Edition got
destroyed. A new copy was purchased to replace it, and this copy was from
the fifth printing of the Second Edition. My new copy had all the minor
corrections included in it that had been posted earlier by Dennis Ritchie.

I have had my new copy of the Second Edition for several months now, I
imagine that most all of the copies being sold today have the corrections
in them.

--
        Hal Schloss      Pacesetter Systems Inc., A Siemens Company
{uupsi|siemens|hoptoad|hacgate|bellcore|harvard|quad1|mtxinu|
  ashtate|cetacea|otto|uunet}!psivax!woof



Tue, 13 Jul 1993 03:24:10 GMT  
 getting started

% >Authors of the first edition circa 1980 were
% >Kerninghan & Ritchie.  Authors of second edition are ?????.
%
% Still by Brian Kernighan and Dennis Ritchie, published by Prentice-Hall,
% ISBN 0-13-110362-8.
%
% Dennis posted an errata sheet for the Second Edition some time ago; I
% don't know whether or not current printings include these corrections.
% They were relatively minor, though.

If some kind soul could repost the errata sheet, those of us with early
printings of the Second Edition would be most grateful.
________________




Sun, 18 Jul 1993 13:44:17 GMT  
 getting started
: This is a shar archive.  Extract with sh, not csh.
: This archive ends with exit, so do not worry about trailing junk.
: --------------------------- cut here --------------------------
PATH=/bin:/usr/bin:/usr/ucb
echo Extracting 'KR2'
sed 's/^X//' > 'KR2' << '+ END-OF-FILE ''KR2'
XBob Devine (in decwrl.8901231945.AA05683) points out that K&R 2ed
Xclaims (p. 86) that partially initialized automatic aggregates
Xleave the part not explicitly initialized as garbage.
X
XThis claim is in error; as several people have pointed out, the pANS
Xguarantees that if an automatic is initialized at all, it is
Xinitialized the same way as a static, with assignment of 0 to
Xthe missing members.
X
X                       Apologies,
X                       Dennis Ritchie
+ END-OF-FILE KR2
chmod 'u=rw,g=r,o=r' 'KR2'
set `wc -c 'KR2'`
count=$1
case $count in
430)    :;;
*)      echo 'Bad character count in ''KR2' >&2
                echo 'Count should be 430' >&2
esac
echo Extracting 'KR2_errata'
sed 's/^X//' > 'KR2_errata' << '+ END-OF-FILE ''KR2_errata'
XI was a bit surprised to see Chris Beierl's posting of the errata
Xfor K&R second edition.  More accurately, I was surprised to hear
Xthat it was present in his copy of the book, since it was prepared
Xfor posting to this group.  We thought we gave it to our editor at
XPrentice-Hall for his information; he didn't tell us that it
Xwas to be included as an errata list, or even let us know that
Xthis was possible.  We would have worded it a bit differently.
X
XIn any event, here is what we have now.  All of these changes
Xshould be in the second printing.  The main difference between
Xthis and what Beierl posted is the addition of the statement
Xabout initialization of automatic arrays on p. 86.
X
X[Incidentally, the range of tm_sec is really 0 through 61.
XIt seems that two consecutive leap seconds are permitted.]
X
X       Dennis Ritchie

X       att!research!dmr
X
X---------
XNow that X3J11 has voted to send its draft to X3, and further
Xsubstantive changes in the draft standard are unlikely, Brian
Xand I are preparing fixes to put in any future printings
Xof the second edition of "The C Programming Language."
XFortunately, they are minor.  For the benefit of previous
Xand near-future purchasers, here are the changes that were made:
X
XTwo or three sentences in the Preface and Introduction are updated
Xto describe the state of the Standard.
X
Xatof is in stdlib.h, not math.h: changes 71, 76, 82, 121.
X
XOn page 86, error corrected:  missing automatic array initializers
Xare zero too.
X
XOn page 168: changed 1 to 1.0 in frand() to avoid potential overflow.
X
XMinor typos are corrected on pages 87, 89, 164, 165, 180.
X
XThe inconspicuous references to 'noalias' on pages 192 and
X212 are removed.
X
XThe following paragraph is added to the end of section A6.6 (p 199):
X
X       A pointer may be converted to another pointer whose type
X       is the same except for the addition or removal of qualifiers
X       (A4.4, A8.2) of the object type to which the pointer
X       refers.  If qualifiers are added, the new pointer is
X       equivalent to the old except for restrictions implied
X       by the new qualifiers.  If qualifiers are removed, operations
X       on the underlying object remain subject to the qualifiers
X       in its actual declaration.
X
XOn p. 199, beginning of section A6.8, "Any pointer may be converted
Xto type void *..." is changed to "Any pointer >to an object< may
Xbe converted to type void *...".
X
XOn p. 204, A7.4.4, "The operand of the unary + operator must have
Xarithmetic or pointer type..." should read "must have arithmetic type...".
X
XOn p. 206, A7.9, about relational operators:  "Pointers to objects
Xof the same type may be compared..." is changed to "Pointers to
Xobject of the same type >(ignoring any qualifiers)< may be compared...".
X
XThe indented material on p. 209, "According to the restrictions...
Xrelaxing it." is removed.   [This is related to the paragraph added above.
XThe wording of the draft of a year ago made it useless to
Xtake an (int *) pointer, cast it to (const int *), then cast
Xit back to (int *).]
X
XOn p. 219 middle, initialization of structures, add "Unnamed bit-field
Xmembers are ignored, and are not initialized."
X
X
XAppendix B changes:
X
Xp 242:  add "fflush(NULL) flushes all output streams." to fflush description.
X
Xp 243:  change to "it must be called before reading, writing >or any
Xother operation<" in setvbuf description.
X
Xp 249:  add "Comparison functions treat arguments as unsigned char arrays."
Xto string.h description.
X
Xp 255:  change range of tm_sec to (0,61) for leap seconds.
X       CLK_TCK was changed late (12/15/88) to CLOCKS_PER_SEC.
X
Xp 257:  drop U and L suffixes from <limits.h> constants.
X       tm_sec range (00,61) here too.
X
XAppendix C change:
X
Xp 261:  Change "External declarations without any specifiers..." to
X       "External >data< declarations without any specifiers...".
X
XThe index has been reprinted to fix a couple of typos and account for
Xmotion within Appendix A;  one page of the table of contents is changed.
+ END-OF-FILE KR2_errata
chmod 'u=rw,g=r,o=r' 'KR2_errata'
set `wc -c 'KR2_errata'`
count=$1
case $count in
3925)   :;;
*)      echo 'Bad character count in ''KR2_errata' >&2
                echo 'Count should be 3925' >&2
esac
exit 0
--
Temporary files like /tmp/sh$$ are an abomination.


Mon, 19 Jul 1993 02:38:17 GMT  
 getting started

Dennis Ritchie's posting of errata to the first printing of K&R2.
It's now stashed in the anonymous ftp area on cs.toronto.edu as
doc/programming/KR2.errata.

        Mark.



Thu, 22 Jul 1993 05:50:50 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. Book for Getting Started in VS.Net?

2. Getting Started

3. Getting Started

4. newbie question - gcc under linux, getting started

5. Getting started in windows programming

6. Getting started to write a email client

7. Please forgive my greenery, just getting started

8. getting started on multitasking...

9. Getting started ...

10. Getting started with sockets

11. Getting started with sockets

12. RPC - I need help getting started with RPC

 

 
Powered by phpBB® Forum Software