SINEIN2.f95
PROGRAM SINEIN2 ! ! Purpose: to read the file A:\ANGLSINE written by the program SINEOUT2 ! and display the results on the screen. ! IMPLICIT NONE DOUBLE PRECISION:: THETA1, THETA2, THETA3, THETA4 DOUBLE PRECISION:: SINE1, SINE2, SINE3, SINE4 ! ! Open the file A:\ ANGLSINE and read the content, in *-format (for ! simplicity). ! OPEN(3,FILE='A:\ANGLSINE') OPEN(3,FILE='ANGLSINE') READ(3,*)THETA1,SINE1 READ(3,*)THETA2,SINE2 READ(3,*)THETA3,SINE3 READ(3,*)THETA4,SINE4 ! ! Now, display the results on the screen, in two columns. The D24.16 format ! descriptor ensures that all the significant digits are displayed. The ! angles vary from 1 to 4, so the format descriptor F6.1 is appropriate. WRITE(*,100)THETA1,SINE1 WRITE(*,100)THETA2,SINE2 WRITE(*,100)THETA3,SINE3 WRITE(*,100)THETA4,SINE4 ! 100 FORMAT(1X,F6.1,2X,D24.16) ! END PROGRAM SINEIN2