Solved

Urgent need help: a translator for pascal source program

Posted on 1997-04-05
7
231 Views
Last Modified: 2010-04-10
null
0
Comment
Question by:lugangxu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
7 Comments
 

Author Comment

by:lugangxu
ID: 1162579
Adjusted points to 215
0
 

Author Comment

by:lugangxu
ID: 1162580
Edited text of question
0
 

Author Comment

by:lugangxu
ID: 1162581
Adjusted points to 220
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:yonat
ID: 1162582
0
 

Author Comment

by:lugangxu
ID: 1162583
Edited text of question
0
 

Author Comment

by:lugangxu
ID: 1162584
I've successfully made the  program myself!
0
 

Accepted Solution

by:
akapur earned 220 total points
ID: 1162585
Pascal is a procedural language.  So a translator will never be able to produce object oriented C++ code if that is what you want.  The best you can hope for is procedural code which is essentially C.  If you compile the C generated by p2c or ptoc with a C++ compiler you will get all the benefits of type checking that you would with C++ procedural code.  The only difference between procedural C code and procedural C++ code would be the use of streams instead of C I/O statements anyway. I suggest you use p2c of ptoc and if you must change the I/O statements to use streams instead.  Note that by doing this you will be slowing down your prog.  If you want an object oriented implementation of your program you will have to redesign your program.  No current program can convert a procedural design into object oriented design.  
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
c++ syntax question 9 66
learn programming 8 94
visual C++ 1 41
cmake and message 1 22
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

734 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