Fortraneries/Fraktalism/mods/points3d.f90

33 lines
829 B
Fortran

module points3d
implicit none
!-----------------------------------------------------
type t_point3d
double precision :: x, y, z
integer :: seq
end type t_point3d
!-----------------------------------------------------
contains
subroutine list_points3d(array, start, length)
type(t_point3d), dimension(:), intent(in) :: array
integer, intent(in) :: start, length
integer :: sz, i
sz = ubound(array, 1)
if ((start+length) .GT. sz) then
STOP ' : OUT OF BOUND'
endif
! send oi to stdout.
do i = start, start+length
print *, array(i)%x, array(i)%y, array(i)%z, array(i)%seq
enddo
end subroutine list_points3d
!-----------------------------------------------------
end module points3d