Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ Programming ➜ General ➜ Porting from Pascal to C++

Porting from Pascal to C++

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by BP   (2 posts)  Bio
Date Thu 14 Oct 2010 04:27 PM (UTC)
Message
If one were to attempt to port a borland pascal program to C++ what would be the best approach.

BP
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Thu 14 Oct 2010 08:29 PM (UTC)
Message
Google "convert pascal to c++".

I found quite a few links.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by BP   (2 posts)  Bio
Date Reply #2 on Fri 15 Oct 2010 05:55 AM (UTC)
Message
I searched and most require specfic files regarding the borland dialect for Pascal.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Fri 15 Oct 2010 06:10 AM (UTC)
Message
What do you mean by "specific files"? Files you don't have?

This isn't a trivial exercise, Pascal and C are rather different languages. For a small program you could basically rewrite by looking at the intent. For larger programs it could be very tricky to get right.

Not only do you have the language differences, but the libraries themselves (which the code calls) may need to be converted or provided.

You haven't given much detail, like how big a project (how many lines), which version of Pascal, which version of C++ (eg. Microsoft, g++).

And why do it in the first place? Is this some code that does something that isn't available in C?

Years ago Borland had a write-up in their Borland C manual which described the differences between Pascal and C. Is that what you want, just to know roughly what is involved?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


15,723 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.