XXX -> C
Stephen Clamage
steve at taumet.com
Sun Jul 8 08:21:11 AEST 1990
In article <55422 at lanl.gov> rdw2030 at venus.tamu.edu (Mark C. Lowe) writes:
>I've never used a converter before, but I've heard about what they do. What
>kind of performance (or lack thereof) have the readers of this group seen?
I've written converters and used commercial and PD converters.
A converter should leave comments more or less intact, but deciding
where to put comments is not trivial.
If the new language is at the same or lower semantic level, the bulk of
conversion can be pretty good if the converter author is competent. If
the new language is at a higher level, the conversion is going to be of
poor quality. (Imagine going from FORTRAN 66 to C, and not having
loops or data structures in the original -- the result is going
to be very poor C code.)
No matter how good the translation, there will be substantial hand work
to make the program look right. Apart from formatting and putting the
comments in the right places, the coding style won't look right.
One problem area is the run-time library. FORTRAN has functions which
have no counterpart in C. So do BASIC and Pascal. More hand work here.
When you have a substantial program (many of thousands of lines),
a good translator to take care of 85% of the simple stuff is very
cost-effective. Rewriting the program is not always feasible.
--
Steve Clamage, TauMetric Corp, steve at taumet.com
More information about the Comp.lang.c
mailing list