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
|
FTNCHEK Version 3.3 November 2004
File case.f:
1
2 program testcase
3 integer ivar1
4 character*8 cvar1
5 character*1 cvar2
6 logical lvar1
7 real rvar1
8 ivar1 = 3
9 lvar1 = .true.
10
11 select case (ivar1)
^
"case.f", line 11 col 7: Warning: Nonstandard syntax
12 cvar1 = 'no path!'
"case.f", near line 12: Error: No path to this statement
13 case (:-1)
14 cvar1 = 'path'
15 case (10/5 - 2)
16 case (1)
17 case (2:3, 5:7, 9)
18 case (10:)
19 case default
20 cvar2 = 'd'
21 end select
22
23 select case (lvar1)
^
"case.f", line 23 col 7: Warning: Nonstandard syntax
24 case (.false.)
25 case (.true.:)
26 case (:.false.)
^
"case.f", line 26 col 14: Error: ranges may not have type LOGICAL bounds
27 case (1.eq.0)
28 end select
29
30 cvar1 = 'hamster'
31 select case (cvar1)
^
"case.f", line 31 col 7: Warning: Nonstandard syntax
32 case (:'cat')
33 case ('dog':'fer' // 'ret')
34 case ('gerbil')
35 case ('horse':)
36 case default
37 end select
38
39 select case (rvar1)
^
"case.f", line 39 col 7: Warning: Nonstandard syntax
^
"case.f", line 39 col 20: Error: integer, character, or logical expression
required
40 case (-1.0)
^
"case.f", line 40 col 13: Error: integer, character, or logical expression
required
41 case (2:5.0)
^
"case.f", line 41 col 15: Error: integer, character, or logical expression
required
^
"case.f", line 41 col 15: Error: range boundaries must have the same type
42 case (ivar1)
^
"case.f", line 42 col 13: Error: expression must evaluate to a compile-time
constant
43 case (:.false.)
^
"case.f", line 43 col 14: Error: ranges may not have type LOGICAL bounds
44 end select
45 stop
46 end
Module TESTCASE: prog
Variables:
Name Type Dims Name Type Dims Name Type Dims Name Type Dims
CVAR1 char8 CVAR2 char IVAR1 intg LVAR1 logl
RVAR1 real
"case.f", line 20: Warning in module TESTCASE: Variables set but never used:
"case.f", line 20: CVAR2 set
"case.f", line 39: Warning in module TESTCASE: Variables used before set
"case.f", line 39: RVAR1 used; never set
"case.f", line 2: Warning in module TESTCASE: Names longer than 6 chars
(nonstandard):
"case.f", line 2: TESTCASE declared
8 syntax errors detected in file case.f
7 warnings issued in file case.f
|