Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
48 Views

error code 7828

The web page for this code has been removed.  I am wondering if their is a work around for this error?

Thanks.

Michael

0 Kudos
3 Replies
Highlighted
48 Views

Is this the error you received?

7828: The part-name to the right of a part-ref with nonzero rank has the ALLOCATABLE attribute (6.1.2).

What does your code look like; without that, it's all just wild guesses.

                   --Lorri

 

0 Kudos
Highlighted
New Contributor I
48 Views

That is the error that I am getting.  The actual application is proprietary. Have created code that does the same thing using different variable names and data, so that you can understand the problem.

      Type XYZ_TYPE
          Character(len=:), allocatable ::  Name
          Integer*4 Number
      End Type
      Type (XYZ_TYPE), allocatable, dimension(:) :: XYZ
  
  
XYZ = (/XYZ_TYPE("Coupon",1), &
          XYZ_TYPE("Robert",32), &
          XYZ_TYPE("Roberta",5), &
          XYZ_TYPE("Zachery",2), &
          XYZ_TYPE("Mark Phillips",4), &
          XYZ_TYPE("John Smith",6)/)

     
index = Find_string(isize,sName,xyz%Name)

The error is on the %Name in the call to find_string.

0 Kudos
Highlighted
Valued Contributor III
48 Views

you pass xyz%name but xyz is an array so xyz%name is an array of allocatable strings which may or may not be allocated and in general will have variable lengths. I think it is saying you cannot pass that as an arg due to fortran language constraints

0 Kudos