PROGRAM rotwh c Apply transformation crystallographic two-fold around y-axis c to WH file CHARACTER*65 line REAL x(3) WRITE (6, 1000) 'Enter filename for input file:' 1000 FORMAT (a) READ (5, 1000) line OPEN (unit=1, status='OLD', file=line, readonly, form='FORMATTED') WRITE (6, 1000) 'Enter filename for output file:' READ (5, 1000) line OPEN (unit=2, status='UNKNOWN', form='FORMATTED', file=line, 1 carriagecontrol='LIST') c Loop DO WHILE (.TRUE.) READ (1, 1000, end=99) line READ (line(16:45), 1001) x 1001 FORMAT (3f10.4) x(1) = -x(1) x(3) = -x(3) WRITE (line(16:45), 1001) x WRITE (2, 1000) line endDO 99 CLOSE (unit=1) CLOSE (unit=2) end INTEGER FUNCTION length(line) CHARACTER*132 line DO i = 132,1,-1 IF (line(i:i) .NE. ' ') goto 9 endDO 9 length = i return end