Related articles |
---|
[2 earlier articles] |
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) |
Re: Converting Pascal to C++, C# or VB gneuner2@comcast.net (George Neuner) (2006-04-10) |
[3 later articles] |
From: | Neelakantan Krishnaswami <neelk@cs.cmu.edu> |
Newsgroups: | comp.compilers |
Date: | 8 Apr 2006 17:07:55 -0400 |
Organization: | Carnegie Mellon Univ. -- Computer Science Dept. |
References: | 06-04-017 |
Keywords: | Pascal, translator |
Posted-Date: | 08 Apr 2006 17:07:55 EDT |
Steve wrote:
>
> 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++.
There are relatively straightforward ways to compile these, but they
are generally fairly annoying to do, and not a good idea if you hope
to maintain the translated source rather than use C++ as a target
language.
> 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 emulated?
Both of these can be very easily translated to C# using delegates,
which is what C# calls first-class functions.
--
Neel Krishnaswami
neelk@cs.cmu.edu
Return to the
comp.compilers page.
Search the
comp.compilers archives again.