Solved

diffent between Pascal and C++

Posted on 1998-10-15
12
505 Views
Last Modified: 2006-11-17
What is the different between Pascal and C++?
0
Comment
Question by:lewis_loo
12 Comments
 

Expert Comment

by:moin072898
ID: 1175219
What is the different between different language?
0
 
LVL 7

Accepted Solution

by:
Motaz earned 0 total points
ID: 1175220
Pascal is a general purpos language and it is very easy compared with another language ( except Basic ). Pascal is a powerfull language.

C++ is the language for system programs. It is a very powerfull language but it is harder than Pascal. Moreover the compiled C++ program is more optimized ( very small and effiecient ).

But now 32-bit windows version of C++ and Pascal ( for example C++Builder and Delphi ) become the same the only deference I think is the syntax. The optimizer of both languages is the same.

Motaz from Sudan.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1175221
The most significant difference is that standard Pascal is not object-oriented.  That is, it has no features for creating and manipulating objects.  C++ programs on the other hand can be object oriented (although they do not have to be.)

Other than the object oriented differences and the fact that they have substancially different syntax's, the two languages are relatively similar, in that they have comprible features.   Thus most non-object oriented programs can be converted from one to the other by changing the syntax and doing a minimal amount of recoding.   This would not be true with substancially different languages, like basic, for example.
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 5

Expert Comment

by:yonat
ID: 1175222
Not only is standard Pascal not OO, it doesn't even have any way to use more than one compilation unit! Try porting Pascal code from, say, Unix to Borland, to see the amount of compiler-specific extensions needed.

Pascal was designed as a language for teaching purposes, and for that it is very well suited. C, and later C++, was designed as a general purpose programming language. Therefore, it is more powerful and less restrictive. This is good if you know what you're doing - they don't try to "save you from yourself".

See "Why Pascal is Not My Favorite Programming Language" by one of the creators of C, Brian W. Kernighan, at http://www.sequel.net/~pj/htmls/whypascal.html .
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1175223
Standart Pascal is not an OOP the same well as C is not an OOP. Turbo Pascal is an OOP same way as C++ is. C/C++ is a lot more powerful language than Pascal, but Pascal's easier to program. The syntax is a bit different, but that is not the biggest problem. As Yonat says C/C++ is created so it is less restricitve as long as you know what ya doin'... and Pascal is create so you don't mess things up. But if you don't know what ya doing in C/C++ you might mess things up as you've never had ;->

Cheers,
Viktor
0
 
LVL 7

Expert Comment

by:Motaz
ID: 1175224
Yonat I see that page ( Why pascal....) it was written in 1981 !! before Turbo pascal and Object pascal. There was potential change in pascal language during the years from 1981 until 1998. Pascal now is C competitor ( represented by Delphi !).

Motaz
0
 
LVL 5

Expert Comment

by:yonat
ID: 1175225
There were no changes to *standard* Pascal since 1981. There are (and were back then) many vendor-specific extensions to Pascal. Borland (Inprise) extensions are in no way standard. In fact, they are VERY different then those of DEC, Intel, SCO, Apple and others.

C++, on the other hand, is standartized. And even before it was standartized, its implementatins were much more uniform than those of Pascal, not to mention Object Pascal.

If you're only going to use only *one* Pascal compiler, it is possible to compare its specific Pascal dialect with C and C++. Is that the case, lewis_loo? Which compiler is it?
0
 
LVL 7

Expert Comment

by:Motaz
ID: 1175226
Yonat, I think you don't use Turbo pascal at all in your life. You can do any thing with it. Moreover Pascal language is user friendly not like C.

By the way I don't hate C, Turbo C++ is the most strong language  I see before, I use it for 2 years and I like it very mush. But I brefere Turbo Pascal and Delphi.

Motaz

Motaz
0
 
LVL 5

Expert Comment

by:yonat
ID: 1175227
I have used Turbo Pascal (later renamed to Borland Pacal, later renamed to Delphi), VAX Pascal, Apple's Object Pascal, SCO Pascal, and Intel Pascal. They're all different. Each has its strengths and weaknesses.

I like Delphi alot. However, comparing Pascal *in general* with C++, is not like comparing a specific development environment from a specific vendor.

>>>>> Pascal language is user friendly not like C <<<<<

True. For beginners, Pacal is easier than C, and definitely easier than C++. However, Python, VBScript and other languages are even easier. So, if the question is "which language should be the first to learn", I am not sure Pascal is the right answer.
0
 
LVL 7

Expert Comment

by:Motaz
ID: 1175228
Okay, I agree with all your opinions. :)

Motaz.
0
 
LVL 7

Expert Comment

by:Motaz
ID: 1175229
Okay, I agree with all your opinions. :)

Motaz.
0
 
LVL 7

Expert Comment

by:Motaz
ID: 1175230
Okay, I agree with all your opinions. :)

Motaz.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question