Xref: utzoo comp.lang.c:23167 comp.lang.pascal:2567 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!tut.cis.ohio-state.edu!purdue!mentor.cc.purdue.edu!acu From: acu@mentor.cc.purdue.edu (Floyd McWilliams) Newsgroups: comp.lang.c,comp.lang.pascal Subject: Re: Pascal to C (and vice versa) Summary: Don't think it can be done. Message-ID: <4640@mentor.cc.purdue.edu> Date: 23 Oct 89 20:52:47 GMT References: <5164@uhccux.uhcc.hawaii.edu> Reply-To: acu@mentor.cc.purdue.edu (Floyd McWilliams) Followup-To: comp.lang.c Organization: PHAP Lines: 51 In article <5164@uhccux.uhcc.hawaii.edu> dillon@uhccux.uhcc.hawaii.edu (Ian Dillon) writes: >I'm sure this has been asked many times but please bare with me. What is this, comp.lang.c.nudists? (I know, I know, spelling flames are verboten -- just couldn't resist. :-)) >I'm looking for a Pascal to C (and back again) conversion program. If >you have experience with one or both of these programs, please e-mail >the account listed below, rather than cluttering up the Internet. I'd like to see how a C-to-Pascal conversion program would handle this: int i, *pi; pi = &i; Or this: int *A; A = (int *) malloc((unsigned) (sizeof(int) * 20)); A[10] = 5; Or, for that matter, how a Pascal-to-C converter would take: var X : set of char; X := ['a','b','c']; if 'a' in X then X := X + 'A' else X := X * ['b','c']; Now I know all these conversions CAN be done (since C and Pascal are Turing-equivalent). But can they be done by currently available programs? Do C-to-Pascal and Pascal-to-C converters exist? Do they work only on small, non-offensive subsets of either language? >P.S. Should you know of a similar Fortran to C package as well, please > let me know. Fortran-to-C does exist, although I don't know any details. -- "You have angered the great Chac-mool. You will burn in the fiery pits of eternal damnation. That is all." Floyd McWilliams mentor.cc.purdue.edu!acu