1 2FTNCHEK Version 3.3 November 2004 3 4File average.f: 5 6 1 C AUTHORS: MIKE MYERS AND LUCIA SPAGNUOLO 7 2 C DATE: MAY 8, 1989 8 3 9 4 C Variables: 10 5 C SCORE -> an array of test scores 11 6 C SUM -> sum of the test scores 12 7 C COUNT -> counter of scores read in 13 8 C I -> loop counter 14 9 15 10 REAL FUNCTION COMPAV(SCORE,COUNT) 16 11 INTEGER SUM,COUNT,J,SCORE(5) 17 12 18 13 DO 30 I = 1,COUNT 19 14 SUM = SUM + SCORE(I) 20 15 30 CONTINUE 21 16 COMPAV = SUM/COUNT 22 ^ 23Warning near line 16 col 20: integer quotient expr SUM/COUNT converted to 24 real 25 17 END 26 27Module COMPAV: func: real 28 29Variables: 30 31 Name Type Dims Name Type Dims Name Type Dims Name Type Dims 32 COMPAV real COUNT intg I intg* J intg 33 SCORE intg 1 SUM intg 34 35* Variable not declared. Type has been implicitly defined. 36 37 38Warning in module COMPAV: Variables declared but never referenced: 39 J declared at line 11 40 41Warning in module COMPAV: Variables may be used before set: 42 SUM used at line 14 43 SUM set at line 14 44 45 46Statement labels defined: 47 48 Label Line StmtType 49 <30> 15 exec 50 51 18 52 19 53 20 PROGRAM AVENUM 54 21 C 55 22 C MAIN PROGRAM 56 23 C 57 24 C AUTHOR: LOIS BIGBIE 58 25 C DATE: MAY 15, 1990 59 26 C 60 27 C Variables: 61 28 C MAXNOS -> maximum number of input values 62 29 C NUMS -> an array of numbers 63 30 C COUNT -> exact number of input values 64 31 C AVG -> average returned by COMPAV 65 32 C I -> loop counter 66 33 C 67 34 68 35 PARAMETER(MAXNOS=5) 69 36 INTEGER I, COUNT 70 37 REAL NUMS(MAXNOS), AVG 71 38 COUNT = 0 72 39 DO 80 I = 1,MAXNOS 73 40 READ (5,*,END=100) NUMS(I) 74 41 COUNT = COUNT + 1 75 42 80 CONTINUE 76 43 100 AVG = COMPAV(NUMS, COUNT) 77 44 END 78 79Module AVENUM: prog 80 81External subprograms referenced: 82 83 COMPAV: real* 84 85Variables: 86 87 Name Type Dims Name Type Dims Name Type Dims Name Type Dims 88 AVG real COUNT intg I intg MAXNOS intg* 89 NUMS real 1 90 91* Variable not declared. Type has been implicitly defined. 92 93 94Warning in module AVENUM: Variables set but never used: 95 AVG set at line 43 96 97I/O Operations: 98 99 Unit ID Unit No. Access Form Operation Line 100 5 SEQ FMTD READ 40 101 102Statement labels defined: 103 104 Label Line StmtType Label Line StmtType 105 <80> 42 exec <100> 43 exec 106 107 108 0 syntax errors detected in file average.f 109 6 warnings issued in file average.f 110 111Warning: Subprogram COMPAV argument data type mismatch at position 1: 112 Dummy arg SCORE in module COMPAV line 10 file average.f is type intg 113 Actual arg NUMS in module AVENUM line 43 file average.f is type real 114