diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2021-08-04 15:18:08 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2021-08-04 15:18:08 -0400 |
commit | 70fd14e98bc476a84aef352eaf063cfcba44ab83 (patch) | |
tree | 2737f5c1c21c76824f49c6a1b9c7061952b646f5 /Obshead.f | |
parent | c396a4bc7a3282de9d2191de0e1076fec9df0783 (diff) | |
download | moog-70fd14e98bc476a84aef352eaf063cfcba44ab83.tar.gz |
Use modern equality operators
Diffstat (limited to 'Obshead.f')
-rwxr-xr-x | Obshead.f | 54 |
1 files changed, 27 insertions, 27 deletions
@@ -13,66 +13,66 @@ c****************************************************************************** do j=1,36 k = 80*(j-1) - if (head(k+1:k+8) .eq. 'SIMPLE ') then - if (head(k+30:k+30) .ne. 'T') then + if (head(k+1:k+8) == 'SIMPLE ') then + if (head(k+30:k+30) /= 'T') then write(array,1029) head(k+1:k+58) istat = ivwrite (line+2,3,array,79) go to 1007 endif - elseif (head(k+1:k+8) .eq. 'BITPIX ') then + elseif (head(k+1:k+8) == 'BITPIX ') then read (head(k+1:k+80),1025) ibits - if (ibits .eq. 16) then + if (ibits == 16) then nblock = 1440 - elseif (ibits .eq. 32) then + elseif (ibits == 32) then nblock = 720 - elseif (ibits .eq. -32) then + elseif (ibits == -32) then nblock = 720 else write(array,1026) ibits istat = ivwrite (line+2,3,array,32) go to 1007 endif - elseif (head(k+1:k+8) .eq. 'NAXIS ') then + elseif (head(k+1:k+8) == 'NAXIS ') then read (head(k+1:k+80),1025) naxis - if (naxis .ne. 1) then + if (naxis /= 1) then write(array,1028) head(k+1:k+58) go to 1007 endif - elseif (head(k+1:k+8) .eq. 'NAXIS1 ') then + elseif (head(k+1:k+8) == 'NAXIS1 ') then read (head(k+1:k+80),1025) lount - elseif (head(k+1:k+8) .eq. 'OBJECT ') then + elseif (head(k+1:k+8) == 'OBJECT ') then write (obsitle,1027) head(k+12:k+80) - elseif (head(k+1:k+8) .eq. 'BZERO ') then + elseif (head(k+1:k+8) == 'BZERO ') then read (head(k+1:k+80),1024) bzero - elseif (head(k+1:k+8) .eq. 'BSCALE ') then + elseif (head(k+1:k+8) == 'BSCALE ') then read (head(k+1:k+80),1024) bscale - elseif ((head(k+1:k+8) .eq. 'W0 ') .or. - . (head(k+1:k+8) .eq. 'CRVAL1 ')) then + elseif ((head(k+1:k+8) == 'W0 ') .or. + . (head(k+1:k+8) == 'CRVAL1 ')) then read (head(k+1:k+80),1024) disp(1) - elseif ((head(k+1:k+8) .eq. 'WPC ') .or. - . (head(k+1:k+8) .eq. 'CDELT1 ')) then + elseif ((head(k+1:k+8) == 'WPC ') .or. + . (head(k+1:k+8) == 'CDELT1 ')) then read (head(k+1:k+80),1024) dval - if (dval .ne. 1.) disp(2) = dval - elseif (head(k+1:k+8) .eq. 'CD1_1 ') then + if (dval /= 1.) disp(2) = dval + elseif (head(k+1:k+8) == 'CD1_1 ') then read (head(k+1:k+80),1024) disp(2) - elseif (head(k+1:k+8) .eq. 'FILENAME') then + elseif (head(k+1:k+8) == 'FILENAME') then write (obsitle(39:80),1023) head(k+12:k+53) - elseif (head(k+1:k+8) .eq. 'HISTORY ') then - if (head(k+24:k+28) .eq. 'DISP=') then + elseif (head(k+1:k+8) == 'HISTORY ') then + if (head(k+24:k+28) == 'DISP=') then read (head(k+1:k+80),1022) (disp(i),i=1,4) - elseif (head(k+20:k+26) .eq. 'D1,2,3:') then + elseif (head(k+20:k+26) == 'D1,2,3:') then read (head(k+1:k+80),1042) (disp(i),i=1,3) - elseif (head(k+20:k+26) .eq. 'D4,5,6:') then + elseif (head(k+20:k+26) == 'D4,5,6:') then read (head(k+1:k+80),1042) (disp(i),i=4,6) - elseif (head(k+20:k+26) .eq. 'D7,8,9:') then + elseif (head(k+20:k+26) == 'D7,8,9:') then read (head(k+1:k+80),1042) (disp(i),i=7,9) - if (disp(7).ne.0.0 .and. disp(8).eq.0.0 .and. - . disp(9).eq.0.0) then + if (disp(7)/=0.0 .and. disp(8)==0.0 .and. + . disp(9)==0.0) then disp(8) = 1.0 disp(9) = lount endif endif - elseif (head(k+1:k+8) .eq. 'END ') then + elseif (head(k+1:k+8) == 'END ') then iend = 1 return endif |