Fred Cisin wrote:
> How well
does it do on something "simple", and less esoteric, such as
> translating FORTRAN to BASIC?
On Mon, 16 Jan 2023, Chuck Guzis via cctalk
wrote:
How about FORTRAN to RPG?
Certainly more of a challenge!
But, a good way to quanitfy how far along they are getting on it.
The range of code traanslation goes from trivial to extreme.
The question is where is it currently on that scale?
Yes, conversion of FORTRAN-IV to Fortran-77 should be easy.
And considering that many systems ADD capoabilities, converting Fortran-77
to FORTRAN-IV might be a bit harder.
In the 1980s, I used WATFIV. WATFIV stood for "Waterloo FORTRAN IV" which was
actually FORTRAN-IV with some Fortran-77-like extensions such as character
variables, IF-THEN-ELSE and WHILE-ENDWHILE for example.
The WATFIV runtime library came with a subroutine (called TRANSL IIRC) which
could be used to translate code with WATFIV extensions to FORTRAN-IV.
I can't remember what it did with character variables but it translated
IF-THEN-ELSE and WHILE-ENDWHILE constructs into IF-GOTO-CONTINUE type
constructs which just worked. I think dealing with character variables may
have required some human input but I don't really recall.
(compare that to converting 8080 to Z80, vs converting Z80 to 8080)
still relatively straight-forward, but a few additional complications.
How about translating code from Z80 which has several registers to 6502 with
rather fewer? That would seem to need some more intelligent thinking on
how to simulate the unavailable registers without causing additional
difficulties.
Regards,
Peter Coghlan.