
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(*)
                                                                    ^
Warning near line 7 col 61: Nonstandard syntax: local array cannot have
 variable size
      8       pointer           (ptr1, pointee1),
              ^
Warning near line 8 col 7: 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)
                   ^
Nonportable usage near line 19 col 12: mixed default and explicit precision 
 items: intg expr LOC(ARRAY1) assigned to intg*4 PTR1
     20       ptr2 = loc(array1)
                   ^
Nonportable usage near line 20 col 12: mixed default and explicit precision 
 items: intg expr LOC(ARRAY1) assigned to intg*4 PTR2
     21       ptr3 = loc(array1)
                   ^
Nonportable usage near line 21 col 12: 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)
                   ^
Nonportable usage near line 27 col 12: mixed default and explicit precision 
 items: intg expr LOC(ARRAY2) assigned to intg*4 PTR1
     28       ptr2 = loc(array2)
                   ^
Nonportable usage near line 28 col 12: mixed default and explicit precision 
 items: intg expr LOC(ARRAY2) assigned to intg*4 PTR2
     29       ptr3 = loc(array2)
                   ^
Nonportable usage near line 29 col 12: 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  



Warning in module CYRPTR: Variables set but never used:
    PTR1 set at line 19
    PTR2 set at line 20
    PTR3 set at line 21


Warning in module CYRPTR: Non Fortran 77 intrinsic functions referenced:
    LOC referenced at line 19

Warning in module CYRPTR: Names longer than 6 chars (nonstandard):
    POINTEE1 declared at line 7
    POINTEE2 declared at line 7
    POINTEE3 declared at line 7
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

