home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / c / 16975 < prev    next >
Encoding:
Text File  |  1992-11-21  |  1.6 KB  |  57 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!linac!att!att!dptg!ulysses!allegra!princeton!csservices!kastle!blume
  3. From: blume@kastle.Princeton.EDU (Matthias Blume)
  4. Subject: Re: Pascal as C prelude?
  5. Message-ID: <1992Nov21.181810.29808@csservices.Princeton.EDU>
  6. Sender: news@csservices.Princeton.EDU (USENET News System)
  7. Reply-To: blume@kastle.Princeton.EDU (Matthias Blume)
  8. Organization: Dept. of Computer Science, Princeton University
  9. References: <forb0004.94.722315425@student.tc.umn.edu> <3903@dozo.and.nl>
  10. Date: Sat, 21 Nov 1992 18:18:10 GMT
  11. Lines: 44
  12.  
  13. In article <3903@dozo.and.nl>, jos@and.nl (Jos Horsmeier) writes:
  14. |> 
  15. |> My advice is: study Pascal first and when you think you've got a firm
  16. |> notion of pointers, pointer arithmetic, dynamic memory allocation and
  17.                ^^^^^^^^^^^^^^^^^^
  18. |> all sorts of wonderful stuff, switch to C. 
  19. |> 
  20.     Pardon me!?  How should you get a firm notion of THAT by learning
  21.     Pascal????
  22.  
  23. |> #define SILLY_MODE
  24. |> #ifdef SILLY_MODE
  25. |> 
  26. |> There's just one drawback, when you do this: you'll end up writing
  27. |> ugly formatted code like:
  28. |> 
  29. |> if (condition)
  30. |>     {
  31. |>     statement1;
  32. |>     statement2;
  33. |>     }
  34. |> 
  35. |> instead of the proper:
  36. |> 
  37. |> if (condition) {
  38. |>     statement1;
  39. |>     statement2;
  40. |> }
  41. |> 
  42. |> #endif
  43.  
  44. # define SERIOUS_MODE
  45. # ifdef SERIOUS_MODE
  46.  
  47. The real problem is not, that those C-programs LOOK LIKE Pascal programs ---
  48. they ARE Pascal programs with a slightly different syntax.  I've seen a lot
  49. of ``so-called'' C programs showing that their programmers didn't really learn
  50. C but only how to ``hand-translate'' Pascal code (or whatever) into C.
  51.  
  52. :-(
  53.  
  54. # endif
  55.  
  56. -Matthias
  57.