FORTRAN Reference Manual
Program Compilation
FORTRAN Reference Manual—528615-001
9-30
Using the SEARCH Directive—Sample Program 1
?SEARCH makeone
?SOURCE xpose
?SOURCE global
C Initialize the array --
DO 20 row = 1, asize
 DO 10 column = 1, asize
array(row, column) = asize*(row-1) + column
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
Alternative Development Using the Interactive Binder
For the descriptions of the ADD and BUILD commands used to perform the following 
steps, see the Binder Manual.
1. Code and compile separately three routines: the main program (given the name 
MAIN^ by FORTRAN), the subroutine PRINTARRAY, and a dummy for the 
transpose subroutine, TRANSPOSE. The object files are in disk files named MAIN, 
PRINT, and DUMMY.
2. Use the interactive Binder to build a program file by binding the object code 
produced in Step 1. The file name for the program file is MAKEONE. It contains 
copies of the MAIN^, PRINTARRAY, and TRANSPOSE code. No changes are 
made to the MAIN, PRINT, and DUMMY disk files.
3. Run the program produced in Step 2.










