Solved

Urgent need help: a translator for pascal source program

Posted on 1997-04-05
7
181 Views
Last Modified: 2010-04-10
null
0
Comment
Question by:lugangxu
  • 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

757 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

22 Experts available now in Live!

Get 1:1 Help Now