~ubuntu-branches/ubuntu/edgy/ftnchek/edgy

« back to all changes in this revision

Viewing changes to test/Okay/average.fcl

  • Committer: Bazaar Package Importer
  • Author(s): Mark Brown
  • Date: 2002-03-28 10:49:50 UTC
  • Revision ID: james.westby@ubuntu.com-20020328104950-kssfxlf8u0qsfelr
Tags: upstream-3.1.2
ImportĀ upstreamĀ versionĀ 3.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
FTNCHEK Version 3.1 May 2001
 
3
 
 
4
File 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
                           ^
 
23
Warning near line 16 col 20: integer quotient expr SUM/COUNT  converted to
 
24
 real
 
25
     17         END
 
26
     18 
 
27
 
 
28
Module COMPAV: func: real
 
29
 
 
30
Variables:
 
31
 
 
32
      Name Type Dims     Name Type Dims     Name Type Dims     Name Type Dims
 
33
    COMPAV real         COUNT intg             I intg*            J intg   
 
34
     SCORE intg  1        SUM intg   
 
35
 
 
36
* Variable not declared. Type has been implicitly defined.
 
37
 
 
38
 
 
39
Warning in module COMPAV: Variables declared but never referenced:
 
40
    J declared at line 11
 
41
 
 
42
Warning in module COMPAV: Variables may be used before set:
 
43
    SUM used at line 14
 
44
    SUM set at line 14
 
45
 
 
46
 
 
47
Statement labels defined:
 
48
 
 
49
    Label   Line  StmtType
 
50
     <30>     15      exec
 
51
 
 
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
 
 
79
Module AVENUM: prog
 
80
 
 
81
External subprograms referenced:
 
82
 
 
83
    COMPAV: real*  
 
84
 
 
85
Variables:
 
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
 
 
94
Warning in module AVENUM: Variables set but never used:
 
95
    AVG set at line 43
 
96
 
 
97
 
 
98
Statement labels defined:
 
99
 
 
100
    Label   Line  StmtType    Label   Line  StmtType
 
101
     <80>     42      exec    <100>     43      exec
 
102
 
 
103
 
 
104
 0 syntax errors detected in file average.f
 
105
 6 warnings issued in file average.f
 
106
 
 
107
Warning: Subprogram COMPAV argument data type mismatch at position 1:
 
108
    Dummy arg SCORE in module COMPAV line 10 file average.f is type intg
 
109
    Actual arg NUMS in module AVENUM line 43 file average.f is type real