Dann Corbit wrote:Tord Romstad wrote:Dann Corbit wrote:I think it will be hard to change it to use freepascal.
Delphi is an OO language like C++ or .NET stuff, and the Delfi engine has lots of classes and inheritance stuff in it.
I have no experience with either Free Pascal nor Delphi, I just saw the following text at the Free Pascal web page and thought the languages were mostly compatible:
The language syntax has excellent compatibility with TP 7.0 as well as with most versions of Delphi (classes, rtti, exceptions, ansistrings, widestrings, interfaces).
I suppose I was too optimistic.
Maybe it will work then. I just expected that freepascal was a pascal dialect and not a delphi dialect (the two things are VERY different langauges).
Depends on your definition of Pascal. I am not familiar with the Pascal community, but I doubt that any Pascal programmer today would dispute that Delphi is a Pascal dialect. Old standard Pascal is essentially a dead language (or so I think, but I could be wrong). It has been replaced by numerous modern variants, most of them supporting some kind of OO. Delphi (which is descended from a Pascal dialect known as "Object Pascal", developed by Apple some time in the 1990s) is one of those, and because of its immense popularity it has almost become a de facto standard. It is my impression that most of the Pascal implementations in active development today (including Free Pascal and GNU Pascal) attempt to be at least partially compatible with Delphi.
People know Pascal or the Pascal community better than me (Mark? Fabio?) are welcome to correct any incorrect statments I have made above.
Another possibility is to convert it to C++. Here is a tool that may get the job started:
http://ivan.vecerina.com/code/delphi2cpp/I gave it a run through, and it barfs on the inline assembly and a few other things and none of the output C++ files are compilable, but it is still a long way along towards the goal compared to hand conversion. I don't think I will be tackling it, but I am curious to understand how Delfi works. I will find the C++ code easier reading than the Delphi source and so I have gotten as far as I need.
My experience is that machine-translated code sometimes works, but it is is usually utterly unreadable. I would expect it to be much easier (as well as more fun) to learn enough Delphi to be able to read the original source code than to try to decipher some machine translation to C++.
I downloaded and tried freepascal (gads, what a horrid IDE).
IDEs are always horrid.
Got 39 errors on the first file I tried. I guess it won't be simple to convert from Delphi to Freepascal.
I'll still give it a try. I will probably find the Delphi code slightly easier to work with than you do. I'm a programming language junkie, remember.
I seem to recall that Kylix is supposed to be pretty much a clone of Delphi. Maybe a port to Kylix would not be too difficult (Kylix runs under Linux).
Yes, but I don't run Linux.
Tord