[fpc-pascal] c to pascal converters

dhkblaszyk at zeelandnet.nl dhkblaszyk at zeelandnet.nl
Thu May 3 12:03:44 CEST 2012


c2pas32 often gives acceptable results. 

On 3 mei '12,
marcov at stack.nl wrote: 

> Hello,
> I'm in the process of converting
an old MSVC6 application to FPC/Delphi,
> so I'm thinking about using a
c to pascal converter.
> The code is older 6-10kloc, and is plain C
in a MFC C++ framework. It does
> nothing but processing samples (array
handling and transformation), and
> drawing a graph of it. There are
some more I/O related tasks, but they don't
> need to be converted
because of changing hardware.
> A converter would preferably convert
method bodies (copy and past to new
> file no problem) to Pascal.
The code is fairly straightforward but uses a lot of in-code variable
declarations (often arrays) and a lot of for loops that are not of the
standard form. 
> I'm mostly only interested in getting the relevant
for and while loops
> converted without too much trouble. 
> I tried
two things on the net (Al Gun's c2pas and an older simtel one) and
they are mostly based on substitution and worse, they do these
> indiscriminately. (e.g. they do statement like
substitutions in for()
> expressions)
> Something that just do grunt
work, but leaves code alone when in doubt would
> already be progress.

> Does anybody have good experiences with this or the other converter?
> for the softfpu units of FPC)
> Marco
> fpc-pascal maillist -
fpc-pascal at lists.freepascal.org [1]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal [2]


[1] mailto:fpc-pascal at lists.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20120503/85aa0537/attachment.html>

More information about the fpc-pascal mailing list