Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!uunet!cs.dal.ca!silvert From: silvert@cs.dal.ca (Bill Silvert) Newsgroups: comp.lang.pascal Subject: Re: HELP: Pascal -=> C Summary: Defines help Message-ID: <1990Jan16.133841.2207@cs.dal.ca> Date: 16 Jan 90 13:38:41 GMT References: <449@ns-mx.uiowa.edu> Sender: silvert@cs.dal.ca.UUCP (Bill Silvert) Reply-To: bill@biomel.UUCP Organization: Habitat Ecology Div., Bedford Inst. of Oceanography Lines: 23 In article <449@ns-mx.uiowa.edu> eahill@umaxc.weeg.uiowa.edu (Edward Hill) writes: > I am currently trying to port a program to a NeXT. This is a very very > large program and I have the source code written in Pascal. To make > my life a lot easier, I am looking for a program that will translate > Pascal code to C code ( crude I understand ). The syntax of C and Pascal are close enough so that by the proper use of defines one can compile a lot of Pascal code with a C compiler (for example, #define begin { and #define end }). I haven't done this, but when the Atari ST was new a lot of Atari magazines carried C code that looked for all the world like Pascal, and some of the tricks they used were really clever, as well as portable. Of course a similar approach would be to use sed or m4 to translate keywords -- I think I have seen a sed script for Modula-2 to C, but don't know if I can still find it. -- Bill Silvert, Habitat Ecology Division. Bedford Institute of Oceanography, Dartmouth, NS, Canada B2Y 4A2 UUCP: ...!{uunet,watmath}!dalcs!biomel!bill Internet: bill%biomel@cs.dal.CA BITNET: bill%biomel%dalcs@dalac