On 05/23/11 05:05, Joel Rees wrote: > On Sun, May 22, 2011 at 10:54 AM, Marko Vojinovic<vvmarko@xxxxxxxxx> wrote: >> On Sunday 22 May 2011 02:23:36 Kevin J. Cummings wrote: >>> On 05/21/2011 08:27 PM, JD wrote: >>>> This is the sample pascal module: >>> This is not PASCAL. It might very well be Object Pascal, which is a >>> (slightly) different language. Different enough that the p2c compiler >>> does not know about the extensions in Object Pascal, so I can see how it >>> would fail. You need to find an Object Pascal to C translator.... >> AFAIK, an OO language cannot be mapped into a procedural one so easily. Maybe >> you can find an Object Pascal to C++ translator, but I'm not so sure it's >> translatable to just C. Not by a machine, anyway. > ?? > > Sure it can. Or, at least, object languages that have their roots in > procedural languages can be translated to C. C++ is just one example, > although I'll admit that it turned/turns out to be harder than it > first appeared when a lot of us thought we could just pervert or maybe > extend the pre-processor. You do need a lot of runtime support > (special libraries), and you end up with a lot of odd-looking function > calls. > > The output of the translation step is by no means pretty, .... > > A lot of the peculiarities in both Java and C++ are derived from false > paths taken in that adventure, near as I can tell. > > JD -- > > You have checked the wikipedia page on object pascal, right? > > Is there a reason you need C source output? I thought I would convert a pascal source code to C simply because I would rather work in C than pascal. But if there is no free real working translator for OO Pascal to C, I abandoned the effort. -- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines