Re: c to Pascal translators?

Ray Dillinger <bear@sonic.net>
6 Mar 1998 02:07:13 -0500

          From comp.compilers

Related articles
c to Pascal translators? bdc2@po.CWRU.Edu (1998-02-18)
Re: c to Pascal translators? adrian@dcs.rhbnc.ac.uk (1998-02-20)
Re: c to Pascal translators? geert@sun3.iaf.nl (Geert Bosch) (1998-02-20)
Re: c to Pascal translators? pdbaylie@eos.ncsu.edu (Peter D Baylies) (1998-02-20)
Re: c to Pascal translators? ssu95atc@reading.ac.uk (Tony Curtis) (1998-02-20)
Re: c to Pascal translators? derek@knosof.co.uk (1998-03-03)
Re: c to Pascal translators? bweinra@uswest.com (Bret D Weinraub) (1998-03-05)
Re: c to Pascal translators? bear@sonic.net (Ray Dillinger) (1998-03-06)
Re: c to Pascal translators? fpeelo@portablesolutions.com (Frank Peelo) (1998-03-07)
Re: c to Pascal translators? RogerHA@aol.com (RogerHA) (1998-03-08)
Re: c to Pascal translators? joachim.durchholz@munich.netsurf.de (Joachim Durchholz) (1998-03-12)
Re: c to Pascal translators? albaugh@agames.com (1998-03-12)
Re: c to Pascal translators? anton@mips.complang.tuwien.ac.at (1998-03-15)
Re: c to Pascal translators? torbenm@diku.dk (1998-03-18)
| List of all articles for this month |

From: Ray Dillinger <bear@sonic.net>
Newsgroups: comp.compilers
Date: 6 Mar 1998 02:07:13 -0500
Organization: Cognitive Dissidents
References: 98-02-090 98-02-104
Keywords: C, Pascal, translator, practice

Geert Bosch wrote:


> That's also true the other way around. One particular tricky thing
> in converting Pascal to C are nested procedures with proper scoping.


Actually not very hard. I have done a lot of programming in
Pascal, and I really like the way nested procedures and
functions allow me to control the namespace. C's insistence
on each function definition being top-level, especially when
it's namespace is already crowded, is difficult for me to
work with.


But automatic translation is pretty easy, really. You just
make lookups to identify the variables (and functions) that
are intentionally captured and do hygienic renaming on the
rest.


Bear
--


Post a followup to this message

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