program testf90vectorvaluesubscripts
implicit none

integer, parameter :: n = 10, p =4

integer a(n), v(p), b(p)
integer i

print *,'vector indexing and array construction *****************'
a = 0
v = (/ 4,1,3,9 /)
b = (/ (i*10, i = 1, p) /)

print *,'a = '
print *, a
print *, '***********'
print *,'b = '
print *, b 
print *, '***********'
print *,'v = '
print *, v  
print *, '***********'
print *,'a = '
a(v) = b 
print *, '***********'
print *, a  
print *, '***********'

end

subroutine timer(t)

integer val(8)
double precision t

call date_and_time(values=val)
t = dble(val(8))*1d-3 + dble(val(7)) +          &
    dble(val(6))*60d0 + dble(val(5))*3600d0

end subroutine

! Warning: no access to tty; thus no job control in this shell...
! stty: tcgetattr: Not a typewriter
! /tmp/crguezl directory still exists
! rm: /tmp/crguezl//tmp/crguezl/vectorsubs.das: No such file or directory
! Wed May 19 11:22:50 GMT 1999
!  vector indexing and array construction *****************
!  a =
!            0           0           0           0           0           0
!            0           0           0           0
!  ***********
!  b =
!           10          20          30          40
!  ***********
!  v =
!            4           1           3           9
!  ***********
!  a =
!  ***********
!           20           0          30          10           0           0
!            0           0          40           0
!  ***********
! 0.00u 0.01s 0:00 50% 0+2k 0+5io 0pf+0w
! Wed May 19 11:22:50 GMT 1999
! logout

