1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324
|
FTNCHEK Version 3.3 November 2004
File allkeywords.f:
1 ! All the keywords recognized by ftnchek as of 21 July 2000
^
Warning near line 1 col 1: Nonstandard syntax: inline comment
2 PROGRAM allkeys
3 IMPLICIT NONE
^
Warning near line 3 col 16: Nonstandard syntax
4 BYTE b(100)
^
Warning near line 4 col 7: Nonstandard syntax
5 CHARACTER *100 c
6 DOUBLE COMPLEX a
^
Warning near line 6 col 7: Nonstandard syntax
7 COMPLEX z
8 DOUBLEPRECISION d
9 DOUBLE PRECISION f
10 EXTERNAL f, foo, iftn_calloc
11 INTEGER i, l, u, iftn_calloc
12 LOGICAL bool
13 POINTER (ptr, ptee)
^
Warning near line 13 col 7: Nonstandard syntax
14 INTEGER ptee(*)
^
Warning near line 14 col 20: Nonstandard syntax: local array cannot have
variable size
15 REAL pi
16 EQUIVALENCE (b(1), i)
17 NAMELIST /n1/ a,b,c
^
Warning near line 17 col 7: Nonstandard syntax
18 PARAMETER (pi = 3.1415926)
19 INCLUDE 'block2.i'
^
Warning near line 19 col 7: Nonstandard syntax
Including file block2.i:
1 ! Include file with common block definition for allkeywords.f
^
Warning near line 1 col 1 file block2.i: Nonstandard syntax: inline comment
2 REAL x, y
3 COMMON /block2/ x, y
4
Resuming file allkeywords.f:
20 ACCEPT *, c
^
Warning near line 20 col 7: Nonstandard syntax
21 OPEN(unit=10, file=c)
22 u = 10
23 ASSIGN 100 TO l
24 100 CONTINUE
25 READ(10,*) a, x, i, z, d
26 BACKSPACE 10
27 BACKSPACE u
28 BACKSPACE (unit=10)
29 ptr = iftn_calloc (1000, 4)
^
Nonportable usage near line 29 col 11: mixed default and explicit precision
items: intg expr IFTN_CALLOC(1000,4) assigned to intg*4 PTR
30 CALL foo
31 SELECTCASE (i)
^
Warning near line 31 col 7: Nonstandard syntax
32 CASE (1)
33 ptee(i) = 2
34 CASEDEFAULT
35 ptee(i) = ptee(1)
36 ENDSELECT
37 SELECT CASE (i)
^
Warning near line 37 col 7: Nonstandard syntax
38 CASE (2)
39 i = 3
40 CASE DEFAULT
41 i = 4
42 END SELECT
43 DO 200 i=1,10
44 200 PRINT *, i
45 IF( x .eq. i ) GOTO l
46 INQUIRE(UNIT=u, IOSTAT=i)
47 ENDFILE 10
48 END FILE u
49 ENDFILE (unit=10,err=100)
50 REWIND 10
51 REWIND u
52 REWIND (unit=10)
53 CLOSE (UNIT=10)
54 bool = .TRUE.
55 IF( bool ) THEN
56 WRITE(10,*) a, y, z
57 ELSEIF( .NOT. .FALSE. ) THEN
58 WRITE(UNIT=10,FMT=900) 'Testing 1, 2, 3'
59 900 FORMAT(1x,a20)
60 ELSE
61 CALL bar
62 STOP
63 ENDIF
64 DOWHILE( i .lt. 100 )
^
Warning near line 64 col 7: Nonstandard syntax
65 IF( f(d) .gt. 3.14) THEN
^
Warning near line 65 col 16: comparison mixes terms of different precision:
dble expr F(D) .GT. real const 3.14
66 CYCLE
^
Warning near line 66 col 10: Nonstandard syntax: CYCLE statement
67 ELSE
68 EXIT
^
Warning near line 68 col 10: Nonstandard syntax: EXIT statement
69 END IF
70 ENDDO
^
Warning near line 70 col 7: Nonstandard syntax
71 i = 1
72 DO WHILE( i .lt. 100 )
^
Warning near line 72 col 7: Nonstandard syntax
73 i = i*2
74 END DO
^
Warning near line 74 col 7: Nonstandard syntax
75 DO 300 WHILE( x .gt. 0.0 )
^
Warning near line 75 col 7: Nonstandard syntax
76 TYPE *, pi, 'Over and over'
^
Warning near line 76 col 10: Nonstandard syntax
77 300 CONTINUE
78 DO 4321, WHILE( x .gt. 0.0 )
^
Warning near line 78 col 7: Nonstandard syntax
79 TYPE *, pi, 'Over and over'
^
Warning near line 79 col 10: Nonstandard syntax
80 4321 CONTINUE
81 GO TO 100
82 END
Module ALLKEYS: prog
External subprograms referenced:
BAR: subr F: dble FOO: subr IFTN_CALLOC: intg
Common blocks referenced:
BLOCK2
Namelists defined:
N1
Variables:
Name Type Dims Name Type Dims Name Type Dims Name Type Dims
A dcpx B intg1 1 BOOL logl C char100
D dble I intg L intg PI real
PTEE intg 1 PTR intg4 U intg X real
Y real Z cplx
Warning in module ALLKEYS: Variables set but never used:
PTR set at line 29
Warning in module ALLKEYS: Names longer than 6 chars (nonstandard):
ALLKEYS declared at line 2
IFTN_CALLOC defined at line 11
Warning in module ALLKEYS: Names containing nonstandard characters:
IFTN_CALLOC defined at line 11
Warning in module ALLKEYS: Mixed sizes equivalenced (not portable):
B declared at line 4 with type intg*1
I declared at line 11 with type intg
I/O Operations:
Unit ID Unit No. Access Form Operation Line
10 SEQ BACKSPACE 26 28
10 CLOSE 53
10 SEQ ENDFILE 47 49
10 SEQ FMTD OPEN 21
10 SEQ FMTD READ 25
10 SEQ REWIND 50 52
10 SEQ FMTD WRITE 56 58
* SEQ FMTD ACCEPT 20
* SEQ FMTD PRINT 44
* SEQ FMTD TYPE 76 79
U SEQ BACKSPACE 27
U SEQ ENDFILE 48
U INQUIRE 46
U SEQ REWIND 51
Statement labels defined:
Label Line StmtType Label Line StmtType Label Line StmtType
<100> 24 exec <200> 44 exec <300> 77 exec
<900> 59 format <4321> 80 exec
83 DOUBLEPRECISION FUNCTION f(x)
84 DOUBLE PRECISION x
85 REAL y1, y2
86 DOUBLECOMPLEX a
^
Warning near line 86 col 7: Nonstandard syntax
87 SAVE a
88 DIMENSION a(2)
89 INTRINSIC sqrt
90 COMMON /block1/ y1, y2
91 a(1) = (1.0d1, 2.0d2)
^
Warning near line 91 col 14: nonstandard double precision complex constant
92 a(2) = a(1)
93 f = x*dble(y1*y2)* sqrt(real(a(1)))
94 RETURN
95 END
Module F: func: dble
External subprograms referenced:
DBLE: intrns REAL: intrns SQRT: intrns
Common blocks referenced:
BLOCK1
Variables:
Name Type Dims Name Type Dims Name Type Dims Name Type Dims
A dcpx 1 F dble X dble Y1 real
Y2 real
96 SUBROUTINE foo
97 IMPLICIT INTEGER (A-Z)
98 WRITE(10,*) 'foo'
99 RETURN
100 ENTRY bar
101 WRITE(10,*) 'bar'
102 PAUSE
103 RETURN
104 END
Module FOO: subr
Entry Points
BAR FOO
I/O Operations:
Unit ID Unit No. Access Form Operation Line
10 SEQ FMTD WRITE 98 101
105 BLOCKDATA bdat1
106 COMMON /block1/ a, b
107 DATA a, b /1.0, 2.0/
108 END
Module BDAT1: data
Common blocks referenced:
BLOCK1
Variables:
Name Type Dims Name Type Dims Name Type Dims Name Type Dims
A real* B real*
* Variable not declared. Type has been implicitly defined.
109 BLOCK DATA bdat2
110 IMPLICITNONE
^
Possibly misleading appearance near line 110 col 15: keyword NONE not clearly
separated from context
^
Warning near line 110 col 15: Nonstandard syntax
111 INCLUDE 'block2.i'
^
Warning near line 111 col 7: Nonstandard syntax
Including file block2.i:
1 ! Include file with common block definition for allkeywords.f
^
Warning near line 1 col 1 file block2.i: Nonstandard syntax: inline comment
2 REAL x, y
3 COMMON /block2/ x, y
4
Resuming file allkeywords.f:
112 DATA x, y /1.0, 2.0/
113 END
Module BDAT2: data
Common blocks referenced:
BLOCK2
Variables:
Name Type Dims Name Type Dims Name Type Dims Name Type Dims
X real Y real
0 syntax errors detected in file allkeywords.f
35 warnings issued in file allkeywords.f
Warning: Subprogram IFTN_CALLOC never defined
Invoked in module ALLKEYS line 29 file allkeywords.f
|