Silverfrost Forums

Welcome to our forums

option /RAGGED_ARRAYS

28 Feb 2010 10:54 #6055

Paul,

Is there any further explaination of what option /RAGGED_ARRAYS covers. Is this an allowance for FTN77 memory management arrays, or is it something more complex ? I'm interested by a 'non-rectangular array' and how it could be used. I have a skyline equation solver which addesses a 2d matrix as a set of indexed vectors, with the index pointing to the diagonal of each column. This has always provided problems for /check.

I'd like to know more.

John

1 Mar 2010 9:57 #6057

Looks like the new option will help you. Here is the program in our test suite that fails with /check unless you use the new option.

      program    main
      integer    nmax
      parameter (nmax = 5)
      integer    i, j, ncol, nstart
      integer   a(nmax,nmax), t
      do j = 1, nmax
         do i = 1, nmax
            if (i.eq.j) then
               a(i,j) = i
            else
               a(i,j) = 0
            endif      
         enddo   
      enddo
      ncol = nmax + 1
      nstart = 0
      isum = 0
      do i = 1, nmax 
         nstart = nstart + 1
         ncol = ncol - 1
         call trace(ncol, nmax, a(nstart,nstart), t)
         isum = isum + t
      enddo
      if(isum == 55) print*, 'Success'
      end
c
      subroutine trace (ncol, nmax, a, t)
      integer, intent (in)  :: ncol, nmax
      integer, intent (in)  :: a(nmax,*)                    
      integer, intent (out) :: t
      integer i
      t = 0
      do i = 1, ncol
         t = t + a(i,i)
      enddo
      end
Please login to reply.