home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19245 < prev    next >
Encoding:
Internet Message Format  |  1993-01-05  |  1.4 KB

  1. Path: sparky!uunet!pipex!bnr.co.uk!uknet!newcastle.ac.uk!tuda!n1yrc
  2. From: Raj.Subramani@newcastle.ac.uk (D. Subramani)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Moving from Pascal to C, Help please!!!!!!
  5. Message-ID: <C04E63.863@newcastle.ac.uk>
  6. Date: 31 Dec 92 10:51:39 GMT
  7. References: <78858@hydra.gatech.EDU>
  8. Organization: University of Newcastle upon Tyne, UK, NE1 7RU
  9. Lines: 26
  10. Nntp-Posting-Host: tuda
  11.  
  12. gt6758b@prism.gatech.EDU (Michael Maverick Kopack) writes:
  13.  
  14. [stuff deleted]
  15.  
  16.  
  17. >There are a lot of things about C that I find very frustrating after comming
  18. >from a decent course in Pascal. For one is the way that Arrays are handled.
  19. >I like being able to do stuff like    array [6..26] of int whereas in C you
  20. >get forced into calling the indeces 0-19. I also HATE that there are no true 
  21. >pass by reference parameters! 
  22.  
  23. [stuff deleted]
  24.  
  25. I would recommend that you have a look at "Numerical Recipies in C"
  26. 'cause there they explain how arrays of 2-D are pointers to a pointer
  27. and so on which no one else does. Also they have a few routines that
  28. allocate memory as per your requirement, ie. [6...26] etc. but be 
  29. warned, when you do that you will not be able to exploit the advantages
  30. of pointer arethmatic fully (it will be too confusing).
  31.  
  32. Its best to stop thinking as you did in Pascal/Fortran, to a certain
  33. extent, when using C (easier said than done).
  34.  
  35. Have a error free New Year.
  36.  
  37. raj.subramani@newcastle.ac.uk
  38.