home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19253 < prev    next >
Encoding:
Text File  |  1993-01-05  |  2.2 KB  |  50 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!stanford.edu!nntp.Stanford.EDU!dkeisen
  3. From: dkeisen@leland.Stanford.EDU (Dave Eisen)
  4. Subject: Re: Moving from Pascal to C, Help please!!!!!!
  5. Message-ID: <1993Jan5.162504.1680@leland.Stanford.EDU>
  6. Sender: ?@leland.Stanford.EDU
  7. Organization: Sequoia Peripherals, Inc.
  8. References: <78858@hydra.gatech.EDU> <C04E63.863@newcastle.ac.uk>
  9. Date: Tue, 5 Jan 93 16:25:04 GMT
  10. Lines: 38
  11.  
  12. In article <C04E63.863@newcastle.ac.uk> Raj.Subramani@newcastle.ac.uk (D. Subramani) writes:
  13. >
  14. >I would recommend that you have a look at "Numerical Recipies in C"
  15. >'cause there they explain how arrays of 2-D are pointers to a pointer
  16. >and so on which no one else does. Also they have a few routines that
  17. >allocate memory as per your requirement, ie. [6...26] etc. but be 
  18. >warned, when you do that you will not be able to exploit the advantages
  19. >of pointer arethmatic fully (it will be too confusing).
  20.  
  21. I've never read this book, but I sincerely hope that they do
  22. not explain that 2D arrays are pointers to pointers because
  23. they most certainly are not. This distinction is not fully
  24. understood by a large number of new C programmers and a question
  25. about it appears here every week or two. I would hate to think
  26. that popular books like "Numerical Recipes in C" are contributing
  27. to this misunderstanding.
  28.  
  29. I can tolerate what they do with arrays ranging from 6 to 26 because
  30. while it is not legal C, it does work on every system I've ever
  31. heard about. Still, it would be nice if they had gotten this
  32. right too.
  33.  
  34. I've heard very good things about this book, at least about the
  35. numerical methods it discusses. Still, if I had a need for
  36. numerical methods in my programs, I would buy the original
  37. Numerical Recipes (written in, I assume, FORTRAN) and do the
  38. conversion myself. I don't even know FORTRAN, but I would
  39. feel more comfortable trying to decipher the FORTRAN myself
  40. and converting it to C than I would trusting the author's
  41. knowledge of C.
  42.  
  43.  
  44.  
  45. -- 
  46. Dave Eisen                               Sequoia Peripherals: (415) 967-5644
  47. dkeisen@leland.Stanford.EDU              Home:                (415) 321-5154
  48.        There's something in my library to offend everybody. 
  49.           --- Washington Coalition Against Censorship
  50.