P.S. dont rate c better just because more libraries are written for it.
: P.S. dont rate c better just because more : libraries are written for it.
C is definately better than Pascal beacause of several reasons. In C when you pass parameters to functions then they are actually processedas a STACK while in Pascal it is First-Come Firsr-Serve(Queue).This is advantageous since it prevents errors at "low level" programming. The segement registers are more efficiently controlled in C.What C lacks is the "nested procedures" which is not a big deal. The far pointers in C are more efficeint in C. C has only about 30-40 reserve words and they are enough to do virtually anything.It is upto the programmers that they use the library routines ormake their libraries. New languages such as Java atc are all based on C. Making a new Operating system is a hectic task and canbe efficiently done in C. UNIX which is supposed to be the most secure operating systemhas been written in C(well the most part of it) and Assembly language. About Visual C++ or lets Say API programming in Cwe have more power than any other programming such as Delphi(object pascal) etc.
So, last month I decided I would start getting involved in teaching myself pascal.After a weekend or so, and after all thesei :=42and so, someone showed me some c code.Hey, I had seen c/c++ code before, but never before had I gotten *really* internested in learning c.
So, my opinion is:1)C/C++ source code is FAR more readable and understandable than pascal code.2)I use Linux and Linux=C ;-)3)C is extremely fast4)I don't like Pascal ;-)
Well, in case you are interested, I am now learning C/C++ by a NEW, RECENT book (not like most *obsolete* pascal books), and I am also getting started in Assembly.
So, I vote for the best IMHO combination:
C/C++ and x86 Assembly
Note: Anyone who doubts the abilities of this combination should see *demanding* graphic demos running at 30 to 45 fps at my 486/66 8Megs RAM
Pascal is good for learning because it forces good program structure and requires less knowledge on the part of the user(At first anyway).
One of the main advantages of C though, is that it's a very "low" "High-Level" Language. It's high-level in that it has advanced control structures built in (For loop, switch, etc.) and uses pseudo-english commands. However, it allows lower access to the hardware of a computer than most other high level languages(Pascal, JAVA, Fortran etc.) and most C compilers even have the capability to handle ASM within the code of a C program. The declarations also give the programmer more control. Data types of char, int, long, etc. just specify size. Pascal checks data types more carefully than C. This is a good thing, except that sometimes you may want an integer-size data location to hold ASCII data. In C this is no problem, just put the value there and as long as you remember to use the correct formatting when you need the data it works fine. In Pascal you must use conversion routines that are actually unnecesary except that they help to avoid error.
In summary C is more powerful, and isn't difficult to learn. C requires more careful programming however, mistakes in C can be more costly than in Pascal. Pascal is a good language if you don't wan't to worry as much about making a tiny mistake can fuck up your whole program.(Array out of bounds is allowed in C and can cause serious damage to your data in memory)
It looks like you're new here. If you want to get involved, click one of these buttons!