<div dir="ltr"><div dir="ltr">On Sun, Apr 7, 2024 at 7:10 PM Dave Horsfall <<a href="mailto:dave@horsfall.org">dave@horsfall.org</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 2 Apr 2024, Charles H Sauer (he/him) wrote:<br>
<br>
[...]<br>
<br>
> I wrote a Fortran to PL/I crude translator in SNOBOL [...]<br>
<br>
Gadzooks... For our "write a simple compiler" assignment I threatened to <br>
use SNOBOL, but my lecturer (Ken Robinson) threatened to fail me :-)<br>
<br></blockquote><div>Translating Fortran to PL/I is pretty straightforward. It translates pretty much 1-for-1 except for handling character data. One could replace Fortran's Hollerith-encoded character strings with an integer array on which a PL/I character string has been overlay defined. Back in 1977 I translated the TOPS-10 version of the Adventure game, which was in Fortran, into PL/I so that I could run it on our batch S/370 mainframe. I used an IBM 3277 transaction terminal as the interactive interface. I very carefully translated the TOPS-10 Fortran into IBM PL/I line by line, except for the character data where I bit the bullet and used pure PL/I character variables. The whole thing ran the very first time and had only one obscure bug: instead of saying PLOVER ROOM as one did in the TOPS-10 version, you had to say PLOVERROOM. Once that bug was fixed the PL/I version worked like a charm until we got our VAX, where I did another port of the TOPS-10 program so that it ran under VAX/VMS. This time it stayed in Fortran, but again there was funny business with character strings because of the 36 vs. 32 bit word size.</div><div><br></div><div>If I were to write an automated, general Fortran-to-PL/I translator, SNOBOL would be my language of choice.</div><div><br></div><div>-Paul W.<br></div><div><br></div><div>-Paul W. <br></div></div></div>