Link to home
Start Free TrialLog in
Avatar of gardanzo
gardanzo

asked on

Pascal?

What is Pascal, is it a relative to C
ASKER CERTIFIED SOLUTION
Avatar of Brian122296
Brian122296

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wpmaurice
wpmaurice

Pascal is quite different from C in various ways, like the syntax for loops and so on.
e.g pascal's variable initialization:  x:=0
    C's variable initialization: int x, x=0

However, once you know pascal, it is very easy to learn C. All the things you can do in pascal, you can do it in C. If you are talking about C++, there's only one thing you can do in C++ but not in pascal or C, that is, function overloading. Other programming tasks, such as, creating dynamic link libraries, can be done in either languages.
Pascal was created in the early 1970's by a Swedish professor named Niklaus Wirth. His purpose was to create a programming language that could be used to teach "structured" programming concepts to his students.

Despite efforts by Borland Inc., Pascal never took off as a mainstream language and was confined almost entirely to college courses in programming. Pascal has recently been revived in the marketplace in the form of a product called DELPHI which is used for Windows programming and competes against Visual BASIC.

Pascal is not a relative of 'C' although they share some of the same characteristics. Pascal is not as feature rich, flexible, or portable as 'C'. 'C' was created, not as a teaching tool, but as a systems-level programming language. For example, much of the UNIX operating system is written in 'C' with a small amount of assembler and, perhaps now, even some Perl.

'C' is much harder to learn than Pascal initially. But Pascal is excellent for laying a solid base upon which you can build a programming career. I know, I cut my teeth on Pascal. I reccommend Pascal to learn programming and prepare for other languages like C and C++.
C is more like Pascal than unlike it and both are High Level Languages (HLL) taking source code in the form of simple ASCII text and compiling (translating) to machine code (an executable program file). C was developed for the UNIX Operating System and has proved useful to write other OS's such as MSDOS.  Both started out about the same time and developed from a basic form (eg. ISO Pascal)that had no input or output file-handling routines!  However, Pascal was always meant to be used either for maths or just to teach top-down desined structured programming.  For instance, Pascal allows nested procedure (modules), which C does not. Both allow user defined functions but these are the default in C and vice-versa in Pascal.
Pascal is elegant where C is coarse.  Pascal syntax prevents certain programming errors by employing a pedantic compiler; C allows crass errors but also enables programming "dirty" shortcuts which speeds up programs. C programs may proves unstable compared to Pascal programs before thorough testing. This makes C a more exciting or irritating relative than Pascal to know in the HLL family, depending on your viewpoint.  

Finally, a point to stress is that if you want to get paid to be a programmer, C is the one to learn rather than Pascal.  Unless you learn Borland's Delphi, a visual (windows) language with database-handling facilities, which is based on Borland's Pascal variant.