Solved

Urgent need help: a translator for pascal source program

Posted on 1997-04-05
7
242 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
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 goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

615 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