Archived

This topic is now archived and is closed to further replies.

Danias

Pascal code

Recommended Posts

Danias    122
I have this code purely written in pascal, but I want to implement this in my c++ project. I''ve read somewhere that it''s possible to include pascal-code in c++. Does anyone know how this can be done?

Share this post


Link to post
Share on other sites
xeos    122
Just go out and buy a big phat book on pascal (real old coppies sould be easy to find in a second hand bookstore). Then it''s simply a matter of converting the code yourself (that''s what I''m doing.)

However, there has to be an easier way... is there a program available for people too lazy to learn Pascal just to translate it to C/C++???

Just some thoughts....

Simon Wilson,
XEOS Digital Development

Share this post


Link to post
Share on other sites
Cyberdrek    100
The best way to do this is simply to translate the code to C++ it''s not that complicated. Most pascal functions have their C/C++ equivalent.

Cyberdrek
Headhunter Soft
DLC Multimedia

Share this post


Link to post
Share on other sites
delphi3d    122
It depends on what the Pascal code is for, of course, but you could try sticking it in a DLL. Or a COM object. Or an ActiveX control. Or...

Well, you get the idea

Otherwise, I think it should be possible to have your Pascal compiler generate an OBJ file and to link that to your C app.

Edited by - delphi3d on November 3, 2000 8:39:12 AM

Share this post


Link to post
Share on other sites