|Converting Pascal to C++, C# or VB firstname.lastname@example.org (Steve) (2006-04-03)|
|Re: Converting Pascal to C++, C# or VB email@example.com (Marco van de Voort) (2006-04-08)|
|Re: Converting Pascal to C++, C# or VB firstname.lastname@example.org (2006-04-08)|
|Re: Converting Pascal to C++, C# or VB email@example.com (John O'Harrow) (2006-04-08)|
|Re: Converting Pascal to C++, C# or VB DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-04-08)|
|Re: Converting Pascal to C++, C# or VB firstname.lastname@example.org (Eric) (2006-04-08)|
|Re: Converting Pascal to C++, C# or VB email@example.com (George Neuner) (2006-04-08)|
|[12 later articles]|
|Date:||3 Apr 2006 01:39:03 -0400|
|Posted-Date:||03 Apr 2006 01:39:03 EDT|
I have some legacy machine control code written in ISO std Pascal that I
would like to convert to one of the languages supported by our current
development environment : MS Visual Studio .NET 2003. So that means C++, C
sharp or VB.
It's a big chunk of code - about 500k lines in 200 files. I currently have a
translator that converts it to Delphi. This enables us to run it on a PC,
but it will not fit easily with our newer code which is in C++ and C#. I
plan to extend this translator to generate the new language too. The
translator creates an AST for all the source, and keeps track of
publics/externs. Several passes are then made over the AST to generate the
Delphi units. It's a complicated process, especially for the structured
So the question is which language to use? I know C++ a little, but the other
two are new to me.
So far the main obstacle I can see with C++ is the nested routines of
Pascal. I don't know of any way to do this in C++. Initial investigation
suggests that the struct in C# might be a suitable alternative. It has to
allow access to constants, types and variables declared in an outer scope.
We also have a few instances of Pascal procedural parameters. Can these be
Fortunately no-one ever used conformant arrays. :)
I welcome comments/advice.
Return to the
Search the comp.compilers archives again.