home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sun4nl!and!jos
- From: jos@and.nl (Jos Horsmeier)
- Newsgroups: comp.lang.c
- Subject: Re: Pascal as C prelude?
- Message-ID: <3903@dozo.and.nl>
- Date: 21 Nov 92 15:38:27 GMT
- References: <forb0004.94.722315425@student.tc.umn.edu>
- Organization: AND Software BV Rotterdam
- Lines: 48
-
- In article <forb0004.94.722315425@student.tc.umn.edu> forb0004@student.tc.umn.edu (Eric Forbis) writes:
- |The U of Mn suggests, but does not require, taking a quarter of Pascal
- |before taking C. I have no experience with pascal, but have read that the
- |two languages utilize similar concepts and structures couched in different
- |terms. Is pascal really a useful introduction to C- should I be taking
- |that class after all? It's not my intent to start a C vs pascal flame war
- |here... It seems to me that, if pascal is that similar to C, you might as
- |well forego pascal and hop right into C.
-
- Yes, you could do that, but if you're new to _programming_, you would
- hop right into a slimey can of worms. The C programming language allows
- a programmer to do about anything s/he can come up with, using his/her
- perverted mind ;-) The compiler doesn't really care what you're doing,
- there's no rigid runtime system linked with your code to protect you
- against small errors you accidentally included in your code. On the
- other hand a Pascal compiler (and runtime system) take you by the hand
- and lead you through all twisty passages called programming.
-
- My advice is: study Pascal first and when you think you've got a firm
- notion of pointers, pointer arithmetic, dynamic memory allocation and
- all sorts of wonderful stuff, switch to C.
-
- #define SILLY_MODE
- #ifdef SILLY_MODE
-
- There's just one drawback, when you do this: you'll end up writing
- ugly formatted code like:
-
- if (condition)
- {
- statement1;
- statement2;
- }
-
- instead of the proper:
-
- if (condition) {
- statement1;
- statement2;
- }
-
- #endif
-
- ;-)
-
- kind regards,
-
- Jos aka jos@and.nl
-