C Read the information about one angler from the data file C FLAG is used to indicate whether or not to do an OPEN C and if an error has occurred - return 1 for ok, C 0 to indicate eof, and -1 to indicate error C FLAG must be set to 0 initially C NAME is the angler's name C ID is the angler's 4-digit ID number C FISH is the number of fish caught by the angler today C The two arrays (HVY and LNG) hold the weight and length of C each of the fish caught today (up to 25 fish). The call C to ONESBEST is to determine what the heaviest and longest C fish are for this competitor. These values are placed into C HEAVY and LONG, respectively, and are part of the results. C SUBROUTINE READONE (FLAG, NAME, ID, FISH, HEAVY, LONG) INTEGER FLAG CHARACTER*22 NAME INTEGER ID, J INTEGER*2 FISH REAL HEAVY, HVY(25) INTEGER*2 LONG, LNG(25) C IF (FLAG .EQ. 0) THEN OPEN (12, FILE='FISHES.DAT', STATUS='OLD',ERR=98) ENDIF READ (12,*, END=99) NAME, ID, FISH, X (HVY(J), LNG(J), J=1,FISH) CALL ONESBEST(HVY, LNG, FISH, HEAVY, LONG) FLAG = 1 RETURN C Indicate that eof has been reached 99 FLAG = 0 CLOSE(12) RETURN C Indicate an error 98 FLAG = -1 RETURN END