next up previous contents
Next: Array Bound Violations Up: Arrays Previous: Array I/O

 

Array I/O Example

Consider the matrix A:

tex2html_wrap27209

The following PRINT statements

    ...
     PRINT*, 'Array element   =',a(3,2)
     PRINT*, 'Array section   =',a(:,1)
     PRINT*, 'Sub-array       =',a(:2,:2)
     PRINT*, 'Whole Array     =',a
     PRINT*, 'Array Transp''d =',TRANSPOSE(a)
   END PROGRAM Owt

produce on the screen,

    Array element    = 6
    Array section    = 1 2 3
    Sub-array        = 1 2 4 5
    Whole Array      = 1 2 3 4 5 6 7 8 9
    Array Transposed = 1 4 7 2 5 8 3 6 9

For more information, click here gif


next up previous contents
Next: Array Bound Violations Up: Arrays Previous: Array I/O

©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997
Not for commercial use.