c2pas32 often gives acceptable results. 

On 3 mei '12,
mar...@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
substitions
> 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?
(e.g.
> for the softfpu units of FPC)
> 
> Marco
>
_______________________________________________
> fpc-pascal maillist -
fpc-pascal@lists.freepascal.org [1]
>
http://lists.freepascal.org/mailman/listinfo/fpc-pascal [2]

 


Links:
------
[1] mailto:fpc-pascal@lists.freepascal.org
[2]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to