File: cray-pointers.fcx

package info (click to toggle)
ftnchek 3.3.1-4
  • links: PTS
  • area: main
  • in suites: lenny, squeeze, wheezy
  • size: 8,488 kB
  • ctags: 5,960
  • sloc: ansic: 21,908; fortran: 5,748; yacc: 4,071; sh: 3,035; makefile: 895; lisp: 322; f90: 118; perl: 76
file content (118 lines) | stat: -rw-r--r-- 5,070 bytes parent folder | download | duplicates (5)
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

FTNCHEK Version 3.3 November 2004

File cray-pointers.f:

      1 C From:  USER NOTES ON FORTRAN PROGRAMMING (UNFP) 
      2 C  http://www.ibiblio.org/pub/languages/fortran/ch2-16.html
      3 Copyright (C) 1996-1998 to the contributors.  All rights are reserved.
      4       program cyrptr 
      5       integer           i
      6       real              array1(10),   array2(5), 
      7      &                  pointee1(10), pointee2(5), pointee3(*)
                                                                    ^
"cray-pointers.f", line 7 col 61: Warning: Nonstandard syntax: local array
 cannot have variable size
      8       pointer           (ptr1, pointee1),
              ^
"cray-pointers.f", line 8 col 7: Warning: Nonstandard syntax
      9      &                  (ptr2, pointee2),
     10      &                  (ptr3, pointee3)
     11       data              array1   /0,1,2,3,4,5,6,7,8,9/,
     12      &                  array2   /5,5,5,5,5/
     13 c     ------------------------------------------------------------------
     14       write(*,*) 
     15       write(*,'(1x,a,10f6.1)') 'array1=   ', array1
     16       write(*,'(1x,a,10f6.1)') 'array2=   ', array2
     17 c     ------------------------------------------------------------------
     18       write(*,*) 
     19       ptr1 = loc(array1)
                   ^
"cray-pointers.f", line 19 col 12: Nonportable usage: mixed default and explicit 
 precision items: intg expr LOC(ARRAY1) assigned to intg*4 PTR1
     20       ptr2 = loc(array1)
                   ^
"cray-pointers.f", line 20 col 12: Nonportable usage: mixed default and explicit 
 precision items: intg expr LOC(ARRAY1) assigned to intg*4 PTR2
     21       ptr3 = loc(array1)
                   ^
"cray-pointers.f", line 21 col 12: Nonportable usage: mixed default and explicit 
 precision items: intg expr LOC(ARRAY1) assigned to intg*4 PTR3
     22       write(*,'(1x,a,10f6.1)') 'pointee1= ', pointee1
     23       write(*,'(1x,a,10f6.1)') 'pointee2= ', pointee2
     24       write(*,'(1x,a,10f6.1)') 'pointee3= ', (pointee3(i), i = 1, 10)
     25 c     ------------------------------------------------------------------
     26       write(*,*) 
     27       ptr1 = loc(array2)
                   ^
"cray-pointers.f", line 27 col 12: Nonportable usage: mixed default and explicit 
 precision items: intg expr LOC(ARRAY2) assigned to intg*4 PTR1
     28       ptr2 = loc(array2)
                   ^
"cray-pointers.f", line 28 col 12: Nonportable usage: mixed default and explicit 
 precision items: intg expr LOC(ARRAY2) assigned to intg*4 PTR2
     29       ptr3 = loc(array2)
                   ^
"cray-pointers.f", line 29 col 12: Nonportable usage: mixed default and explicit 
 precision items: intg expr LOC(ARRAY2) assigned to intg*4 PTR3
     30       write(*,'(1x,a,10f6.1)') 'pointee1= ', pointee1
     31       write(*,'(1x,a,10f6.1)') 'pointee2= ', pointee2
     32       write(*,'(1x,a,10f6.1)') 'pointee3= ', (pointee3(i), i = 1, 5)
     33 c     ------------------------------------------------------------------
     34       end
     35 c The result of this program on a VMS machine was:
     36 c
     37 c array1=      0.0   1.0   2.0   3.0   4.0   5.0   6.0   7.0   8.0   9.0
     38 c array2=      5.0   5.0   5.0   5.0   5.0
     39 c
     40 c pointee1=    0.0   1.0   2.0   3.0   4.0   5.0   6.0   7.0   8.0   9.0
     41 c pointee2=    0.0   1.0   2.0   3.0   4.0
     42 c pointee3=    0.0   1.0   2.0   3.0   4.0   5.0   6.0   7.0   8.0   9.0
     43 c
     44 c pointee1=    5.0   5.0   5.0   5.0   5.0   0.0   0.0   0.0   0.0   0.0
     45 c pointee2=    5.0   5.0   5.0   5.0   5.0
     46 c pointee3=    5.0   5.0   5.0   5.0   5.0
     47 c
     48 c

Module CYRPTR: prog

External subprograms referenced:

       LOC: intrns 

Variables:
 
      Name Type Dims     Name Type Dims     Name Type Dims     Name Type Dims
    ARRAY1 real  1     ARRAY2 real  1          I intg      POINTEE1 real  1
  POINTEE2 real  1   POINTEE3 real  1       PTR1 intg4         PTR2 intg4  
      PTR3 intg4  



"cray-pointers.f", line 19: Warning in module CYRPTR: Variables set but never
 used:
"cray-pointers.f", line 19:     PTR1 set
"cray-pointers.f", line 20:     PTR2 set
"cray-pointers.f", line 21:     PTR3 set


"cray-pointers.f", line 19: Warning in module CYRPTR: Non Fortran 77 intrinsic
 functions referenced:
"cray-pointers.f", line 19:     LOC referenced

"cray-pointers.f", line 7: Warning in module CYRPTR: Names longer than 6 chars
 (nonstandard):
"cray-pointers.f", line 7:     POINTEE1 declared
"cray-pointers.f", line 7:     POINTEE2 declared
"cray-pointers.f", line 7:     POINTEE3 declared
I/O Operations:

     Unit ID Unit No. Access Form Operation   Line
           *            SEQ  FMTD WRITE        14     15     16     18     22 
                                               23     24     26     30     31 
                                               32 

 0 syntax errors detected in file cray-pointers.f
 11 warnings issued in file cray-pointers.f