Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

vector subscript of an array

$
0
0

Hi,

Could you explain the difference between the two calls?

The first call changes the expected values ​​while the second provides zero.

Thanks,

Pierre

 

    module essai

    

    contains

        subroutine testarray(array)

            real(4),dimension(:) :: array

            array(:)=1      

        end subroutine      

    end module

    

    program moi

    

    use essai

    

    real(4), dimension(1,20), target :: array

    integer, dimension(2) :: part = (/1,4/)

   

    array=0

    call testarray(array(1,1:4:3))

    array=0

    call testarray(array(1,part))

    end program

    

 

 


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>