demo_copy Program

Uses

Variables

Type Attributes Name Initial
real, allocatable :: from(:)
character(len=*), parameter :: g = '(*(g0.3,1x))'
real, allocatable :: to(:)

Source Code

     program demo_copy
     use M_datapac, only : copy
     implicit none
     character(len=*),parameter :: g='(*(g0.3,1x))'
     real,allocatable :: from(:), to(:)
        from=[1.0,2.0,3.0,4.0,5.0]
        to=[-1.0,-1.0,-1.0,-1.0,-1.0,-1.0]
        call copy(from,3,to)
        write(*,g)to
     end program demo_copy