Postlab07_rfelde

Postlab07_rfelde - ! Read in the number of rows contained...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
! Lab #7: Format Descriptors, Functions and Subroutines ! File: Lab07_CFU_rfelde.f95 ! Date: 14 February 2008 ! By: Ryan Robert Felde ! rfelde ! Section: 02/01, 11:30, and ENAD 138 ! Team: 16 ! ! ELECTRONIC SIGNATURE ! Ryan Robert Felde ! ! The electronic signature above indicates the program submitted for ! evaluation is my individual work and I have a general understanding ! of all aspects of its development and execution. ! ! A BRIEF DESCRIPTION OF WHAT THE PROGRAM OR FUNCTION DOES program implicit none !Initialize Variables integer :: Rows, H, J integer :: status real, dimension(51,3) :: Array character(len = 8) :: filename ! Open Data File open(unit=9, file = 'data.txt', status = 'old', iostat = status)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ! Read in the number of rows contained in the data file read(9,'(i2)') Rows do J = 1, Rows read(9,'(F5.2, 1x, F5.3, 1x, F5.4)')(Array(J,H), H = 1,3) end do ! Call upon subroutine call VSA(Rows, Array) close(9) stop end program ! Define the subroutine and parameter list subroutine VSA(Rows, Array) integer :: I integer, intent(in) :: Rows real, dimension(Rows,3), intent(inout) :: Array ! Use a do loop to print out only the first column of data from the array that was created ! by reading in the data from the data.txt file do I = 1, Rows write(*,10)Array(I,1) end do 10 format (F6.2) return end subroutine VSA...
View Full Document

Page1 / 2

Postlab07_rfelde - ! Read in the number of rows contained...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online