Solved

diffent between Pascal and C++

Posted on 1998-10-15
12
499 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
 
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

705 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now