FORTRAN Reference Manual
Program Compilation
FORTRAN Reference Manual—528615-001
9-27
Using the SEARCH Directive—Sample Program 1
SUBROUTINE printarray
?SOURCE global
INTEGER row, column
WRITE(UNIT=6,FMT='(1h )')
DO 10 row = 1, asize
WRITE(6,1000) (array(row,column), column=1, asize)
10 CONTINUE
RETURN
1000 FORMAT(10I10)
END
Step 2—TRANSPOSE Dummy Subprogram
The following subprogram is compiled using the SOURCE directive from the main:
SUBROUTINE transpose
RETURN
END
If separately compiled, the dummy’s object file would consist of a code block named
TRANSPOSE. No common blocks would be included. (The special blocks #FLUT,
#G0, #LOWBUF, #PUCB, and #RUCB are always included in object files.)
Step 3—Main Program, Version One
Compilation of the source file shown below results in an object file containing a code
block named MAIN^ (the compiler’s default name). It also contains PRINTARRAY, and
TRANSPOSE.










