ken (01/01/83)
Since Ed Reeder from Intel asked for a Ratfor-to-C translator, I thought I would put out a request for a FORTARN-to-C translator. I realize that it is theorectically possible to run "struct" on a fortran file, then use the Ratfor-to-C translator, but I tried this once and the original Fortran program compiled, but the Ratfor one did not. Since most of the world's non-business code is written in Fortran, it would be great to have a Fortran-to-C translator. If one doesn't currently exist, it would be an excellent project for a Master's thesis. Ken Turkowski CADLINC, Palo Alto {ucbvax|decvax}!decwrl!turtlevax!ken
bernie (01/11/83)
A major problem with a Fortran to C translator is that Fortran passes arguments to functions by address, whereas C pass them by value. Not only does this require that you pass arguments as &arg instead of just arg, it also means you have to keep track of which variable used in a function are arguments to it, and consistently use *arg within the function instead of just arg. This is a nuisance! Unfortunately, there's no way around it. (at least, I can't think of any). Any Fortran program large enough to justify automated translation is bound to have functions in it that modify their arguments and expect the corresponding variables in the caller to be modified as well. --Bernie Roehl (...!decvax!watmath!watarts!bernie)