FORTRAN Reference Manual
Program Compilation
FORTRAN Reference Manual—528615-001
9-28
Using the SEARCH Directive—Sample Program 1
?SEARCH printo
?SOURCE dummys
?SOURCE global
INTEGER row, column
C Initialize the array --
DO 20 row = 1, asize
DO 10 column = 1, asize
array(row, column) = asize*(row-1) + column-1
10 CONTINUE
20 CONTINUE
C Display the initialized array
CALL printarray
C Transpose the array
CALL transpose
C Display the transposed array
CALL printarray
STOP 'End of example'
END
Step 4—TRANSPOSE Subprogram
The object file resulting from compilation of this code has a code block, TRANSPOSE.
The file also contains the data blocks seen in earlier steps, including ARRAY. The local
data variables are allocated at execution time.










