Re: Converting Pascal to C++, C# or VB

Martin Ward <martin@gkc.org.uk>
8 Apr 2006 17:06:10 -0400

          From comp.compilers

Related articles
Converting Pascal to C++, C# or VB steve@rh12.co.uk (Steve) (2006-04-03)
Re: Converting Pascal to C++, C# or VB marcov@stack.nl (Marco van de Voort) (2006-04-08)
Re: Converting Pascal to C++, C# or VB torbenm@app-4.diku.dk (2006-04-08)
Re: Converting Pascal to C++, C# or VB john@elmcrest.demon.co.uk (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 englere.geo@yahoo.com (Eric) (2006-04-08)
Re: Converting Pascal to C++, C# or VB gneuner2@comcast.net (George Neuner) (2006-04-08)
Re: Converting Pascal to C++, C# or VB martin@gkc.org.uk (Martin Ward) (2006-04-08)
Re: Converting Pascal to C++, C# or VB neelk@cs.cmu.edu (Neelakantan Krishnaswami) (2006-04-08)
Re: Converting Pascal to C++, C# or VB thompgc@gmail.com (thompgc@gmail.com) (2006-04-08)
Re: Converting Pascal to C++, C# or VB marcov@stack.nl (Marco van de Voort) (2006-04-09)
Re: Converting Pascal to C++, C# or VB marcov@stack.nl (Marco van de Voort) (2006-04-09)
Re: Converting Pascal to C++, C# or VB marcov@stack.nl (Marco van de Voort) (2006-04-09)
Re: Converting Pascal to C++, C# or VB DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-04-10)
[4 later articles]
| List of all articles for this month |
From: Martin Ward <martin@gkc.org.uk>
Newsgroups: comp.compilers
Date: 8 Apr 2006 17:06:10 -0400
Organization: Compilers Central
References: 06-04-017
Keywords: Pascal, translator
Posted-Date: 08 Apr 2006 17:06:10 EDT

On Monday 03 Apr 2006 06:39, Steve wrote:
> 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.


Have you looked at p2c, a Pascal to C translator:


http://directory.fsf.org/p2c.html


"P2c is a tool for translating Pascal programs into C. The input consists of a
set of source files in any of the following Pascal dialects: HP Pascal,
Turbo/UCSD Pascal, DEC VAX Pascal, Oregon Software Pascal/2, Macintosh
Programmer's Workshop Pascal, Sun/Berkeley Pascal, Texas Instruments Pascal,
Apollo Domain Pascal. Modula-2 syntax is also supported.


"Output is a set of .c and .h files that comprise an equivalent program in any
of several dialects of C. Output code may be kept machine and
dialect-independent, or it may be targeted to a specific machine and compiler.
Most reasonable Pascal programs are converted into fully functional C which
will compile and run with no further modifications, although p2c sometimes
chooses to generate readable code at the expense of absolute generality."


--
Martin


martin@gkc.org.uk http://www.cse.dmu.ac.uk/~mward/ Erdos number: 4
G.K.Chesterton web site: http://www.cse.dmu.ac.uk/~mward/gkc/


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.