Some more progress: 1) the darn dollar sign $ From your response: "The first WRITE loop is the one indenting the line properly, which apparently is not valid in F77, as both our F77 compilers failed to do proper indentation. Maybe the format string could be updated to F77 standard; it just specifies two space characters to be output." So my interpretation is that WRITE(IF, '(''$ '')') simply writes two spaces, and can be replaced by write(*,*)' ' where there are two spaces between the single quotes. That makes a lot of sense. The $ sign has been used in various compilers to indicate a macro, or as a suppression of line return, so that helps a lot. It might be some compiler specific feature. 2) The compiler is not happy with the first do loop in SUBROUTINE: DO FOR RETURN = EXTERNAL, EXTERNAL - IF IMPLICIT(RETURN) = LOGICAL(RETURN) + LOGICAL(RETURN - IF) END DO The complier will not throw an error or warning (either when compiling or running), but as I see it, the first time through EXTERNAL = 0 and IF = 1, so you are doing a negative increment DO FOR RETURN = 0, -1 when I test a program with a do loop like above, there are no errors or warnings from the compiler, and the program runs, but it apparently just skips over the do loop and its contents. For example, this code write(*,*)'before do loop' do RETURN = 0, -1 write(*,*)'inside do loop' end do write(*,*)'after do loop' produces the following output: before do loop after do loop 3) The declaration of variables in the main program have IMPLICIT and LOGICAL as scalars, and then are redeclared as arrays in SUBROUTINE; there is no definition of the size of the array (should be 13). Likewise, EXTERNAL is declared as an real in the main program, and redeclared as an integer in SUBROUTINE. 4) last but not least, F66 and F77 limited variables, subroutines, functions, program names to 6 characters; how did your compiler accept the ones that are 7 or more characters long? Thanks again!
Pound to fit, paint to match