Array Manipulation

Whole Array References

    INTEGER, DIMENSION(0:50)   :: stuff
    INTEGER, DIMENSION(-25:25) :: things

    stuff  = 0
    things = stuff
        ! ...things and stuff must be conformable, that is, have the same
        !    shape (i.e., rank and extent on each rank)

Array Section References

    INTEGER, DIMENSION(1:100) :: arr_1
    INTEGER, DIMENSION(1:50)  :: arr_2
    INTEGER, DIMENSION(1:100) :: arr_3, arr_4

    arr_1(1:50)   = 5
    arr_1(51:100) = 25


    ! -- lhs and rhs must be conformable :

    arr_2          = arr_1(1:50)
    arr_3(1:50)    = arr_1(51:100)


    ! -- stride of 2, i.e., start at element 1 and increment by 2 until
    !    100 is reached :

    arr_4(1:100:2) = arr2


...previousup (conts)next...



About this document:

Produced from the SGML: /home/isd/public_html/_course_fortran_90/_reml_grp/index.reml
On: 10/2/2003 at 10:33:52
Options: reml2 -i noindex -l long -o html -p multiple