StartGroepenDiscussieMeerTijdgeest
Doorzoek de site
Onze site gebruikt cookies om diensten te leveren, prestaties te verbeteren, voor analyse en (indien je niet ingelogd bent) voor advertenties. Door LibraryThing te gebruiken erken je dat je onze Servicevoorwaarden en Privacybeleid gelezen en begrepen hebt. Je gebruik van de site en diensten is onderhevig aan dit beleid en deze voorwaarden.

Resultaten uit Google Boeken

Klik op een omslag om naar Google Boeken te gaan.

Mastering C Pointers: Tools for Programming…
Bezig met laden...

Mastering C Pointers: Tools for Programming Power (editie 1990)

door Robert J Traister (Auteur)

LedenBesprekingenPopulariteitGemiddelde beoordelingDiscussies
283845,171 (2)Geen
If you don't fully understand C pointers and how they are used, you're not getting the most out of C programming. This book features complete coverage on using and controlling C language pointers to make C applications more powerful and expressive. This new edition is completely updated and revised to reflect the changes that have been brought about with the full adoption of ANSI C. All discussions and program examples have been updated, and reading materials necessary for any modern ANSI C programmer have also been added.Includes one 3 1/2"" disk containing all of the working programs and m… (meer)
Lid:apotheon
Titel:Mastering C Pointers: Tools for Programming Power
Auteurs:Robert J Traister (Auteur)
Info:Academic Press (1990), Edition: 1st, 182 pages
Verzamelingen:Jouw bibliotheek, Aan het lezen, Te lezen
Waardering:***
Trefwoorden:coding, c

Informatie over het werk

Mastering C pointers :tools for programming power door Robert J. Traister (Author)

Onlangs toegevoegd doorjciern2, Bink42, apotheon, marc.frei, Ildera, briangreiner
Geen
Bezig met laden...

Meld je aan bij LibraryThing om erachter te komen of je dit boek goed zult vinden.

Op dit moment geen Discussie gesprekken over dit boek.

Toon 3 van 3
The author, Robert J. Traister, does an excellent job of explaining pointers very clearly. His pedagogical style is quite instructive, straightforward, and understandable.

There are times the pedagogical style is more pedantic, particularly when Robert gets into the subject of code style, and comes off as unreasonably grumpy, with a "kids these days" attitude, set in old ways. Good source code style is very important for readability (and thus maintainability) of software, but the tenor of Robert's writing on the subject is off-putting and more focused on specific personal preferences as if they were universal absolutes than on the important principles of code clarity one might employ to ensure source readability.

This book addresses its topic in decent depth, though I found it disappointing that it did not delve much into the specifics of certain techniques that should really be more common (and commonly understood) in general C programming practice, such as declaring and using pure-pointer lists/arrays; practical uses of function pointers; and conscious trade-offs for readability, performance, and efficiency of various ways of assigning a variety of C objects' memory addresses to pointer variables (some of which might trade things off in ways contrary to simplistic assumptions of many programmers, including me). All in all, it seems like it should have a title more like A Substantial Introduction To C Pointers or something to that effect, instead of Mastering C Pointers.

Its approach starts with how one might use pointers as references to non-pointer variable types and data. This makes sense if you assume all C programmers start with C books and classes that do not pay enough attention to pointers, and do not start teaching them early enough (a somewhat reasonable assumption, unfortunately). I think it might be improved for at least some readers (like me) by teaching direct and more focused use of pointers first, then tying it back into references to other C objects later. This is a pretty minor matter in the overall value and quality of the book, though, and did not much affect my impression of its quality as a whole.

There are some errors in the book that detract from its immediate value if the reader takes everything directly with little investigation. At the time it was published (with a copyright date of 1990), these errors would be much more catastrophic; today, with the ease of online research, identifying and correcting errors in what the book teaches is a much more trivial exercise. System call and library function manpages on any reasonable Unix-like system (e.g. FreeBSD, many Linux distributions, and especially OpenBSD) can clear up some errors (see example 1 below), and a web search should be able to help with others (see example 2 below).

Finally, the author's focus on DOS as the assumed platform for learning and using the C programming language, and on the particulars of Turbo C (a proprietary compiler now obsolete), is in some ways just a sign of the time in which it was written. In other ways, it seriously damages the accessibility and applicability of examples and even explanations in the book. The entire chapter on direct memory access relies heavily on assumptions around the author's compiler, hardware, and operating system choices, though it effectively introduces the reader to the relevant principles at least.

The book's instructional value for introducing practical pointer use balanced against the above described shortcomings leads me to give a three star review here at Goodreads. I liked the book, but it was neither deeply revelatory nor exceptionally good.

EXAMPLES:

The following examples of errors in the book might not apply to a particular, non-standard C compiler in use at the time the book was written. I am not familiar enough with the author's apparent favorite compiler (Turbo C) from the time of the book's publication to be sure that these were erroneous code examples with the compilers and platforms Robert used while writing this book. I do know they are incorrect now, with standards-compliant C compilers, and the reader should be aware such problems exist in the text.

1. Explanation and use of the strlen() function leaves the reader with the misunderstanding that it returns the number of characters including the terminating ' ' in a string. This is incorrect. It does not include the terminating NULL of a string in its character count. Without correcting this error, a reader could introduce errors into software.

2. An example of writing a function that takes a variable number of arguments (i.e. a variadic function, also known as a function of indefinite arity, though Robert does not use these technical terms) simply does not work. Standards-compliant compilers (starting with ANSI/C89), such as Clang/LLVM with the "-std=c89" option will produce warnings (like too many arguments in call to 'add'). Though the code still compiles with those warnings, it produces garbage output rather than provide the expected functionality using the author's example. ( )
  apotheon | Dec 14, 2020 |
I skimmed this without a computer in front of me, plus its ancient, but it gave me a basic idea of what a pointer is. I would recommend something more current.
  jcrben | Aug 16, 2012 |
Chapter 7 "Pointers and Memory Allocation", pages 102 & 103:
"The strlen() function returns the total number of bytes in the string including the NULL." This is completely incorrect. Any reading of the ANSI-C standard or even K&R will tell you this function never includes the null-terminator in the count. Further exacerbating the situation are the listings written to allocate memory based on this faulty statement.

Chapter 7 "Pointers and Memory Allocation", page 135:
The author attempts to show how one can [incorrectly] write a function to accept a variable number of integer arguments. Any compiler would return an error stating something to the effect of "too many arguments to function 'add'".

Chapter 7 "Pointers and Memory Allocation", page 146:
This last example from the book intends to show [again - incorrectly] how to return a pointer from a function call. The code listed has a subtle but common error most beginners make - returning a reference to a local variable.

char *combine (s, t)
char *s, *t;
{
int x, y ;
char r[100] ;

strcpy (r, s) ;
y = strlen (r) ;

for (x = y ; *t != ' ' ; ++x)
r[x] = *t++ ;

r[x] = ' ' ;
return (r) ;
}

There are many, many more errors like this that render the book useless. In addition, these same errors can be found repeated almost line for line in his other published works ("Master C Pointers" ISBN 0126974098, "Conquering C++ Pointers" ISBN 0126974209). One would be better advised to spend their money on something more factually correct and readable such as:

The C Programming Language, Brian W. Kernighan & Dennis Ritchie, ISBN 0131103628
C: How to Program (any edition), Harvey Deitel & Paul Deitel, ISBN 0132404168 (5th Ed)
C Programming FAQs: Frequently Asked Questions, Steve Summit, ISBN 0201845199
C Programming: A Modern Approach (any edition), K. N. King, ISBN 0393979504 (2nd Ed)
The Standard C Library, P.J. Plauger, ISBN 0131315099
  erik.library | Jun 5, 2007 |
Toon 3 van 3
geen besprekingen | voeg een bespreking toe
Je moet ingelogd zijn om Algemene Kennis te mogen bewerken.
Voor meer hulp zie de helppagina Algemene Kennis .
Gangbare titel
Oorspronkelijke titel
Alternatieve titels
Oorspronkelijk jaar van uitgave
Mensen/Personages
Belangrijke plaatsen
Belangrijke gebeurtenissen
Verwante films
Motto
Opdracht
Eerste woorden
Citaten
Laatste woorden
Ontwarringsbericht
Uitgevers redacteuren
Auteur van flaptekst/aanprijzing
Oorspronkelijke taal
Gangbare DDC/MDS
Canonieke LCC

Verwijzingen naar dit werk in externe bronnen.

Wikipedia in het Engels

Geen

If you don't fully understand C pointers and how they are used, you're not getting the most out of C programming. This book features complete coverage on using and controlling C language pointers to make C applications more powerful and expressive. This new edition is completely updated and revised to reflect the changes that have been brought about with the full adoption of ANSI C. All discussions and program examples have been updated, and reading materials necessary for any modern ANSI C programmer have also been added.Includes one 3 1/2"" disk containing all of the working programs and m

Geen bibliotheekbeschrijvingen gevonden.

Boekbeschrijving
Haiku samenvatting

Actuele discussies

Geen

Populaire omslagen

Snelkoppelingen

Waardering

Gemiddelde: (2)
0.5
1 1
1.5
2 1
2.5
3 1
3.5
4
4.5
5

Ben jij dit?

Word een LibraryThing Auteur.

 

Over | Contact | LibraryThing.com | Privacy/Voorwaarden | Help/Veelgestelde vragen | Blog | Winkel | APIs | TinyCat | Nagelaten Bibliotheken | Vroege Recensenten | Algemene kennis | 206,670,238 boeken! | Bovenbalk: Altijd zichtbaar