replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Error 967
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error 967

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Kenneth_Smith



Joined: 18 May 2012
Posts: 801
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Sun Jan 12, 2025 6:20 pm    Post subject: Error 967 Reply with quote

Paul,

I think you need to look at this one.

Code:
!
! With either the 32 bit or 64 bit complier, with /checkmate the following
! error stops compilation at the line indicated:
!
! error 967 - In the INTERFACE to F1, the first argument (A) is rank 1,
! but it is a scalar in this call
!
! F2 does not generate this error.
!
! If a is not allocatable, and simply real*8 :: a(10) /checkmate does not
! report error 967.
!
! If the contains section of program P1 is commented out and instead uses
! pmod the program compiles and runs without error with /checkmate.
!
module pmod
implicit none
contains
  logical function f1( a )
  real*8, intent(in) :: a(:)
    f1 = .false.
    if (size(a) .gt. 1) f1 = .true.
  end function f1

  function f2( a ) result ( returnvalue )
  real*8, intent(in) :: a(:)
  logical :: returnvalue
    returnvalue = .false.
    if (size(a) .gt. 1) returnvalue = .true.
  end function f2
 
end module pmod

program p1
!use pmod
implicit none
real*8, allocatable :: a(:)
!real*8 :: a(10)
integer :: i
  allocate(a(10))
  do i = 1, 10
    a(i) = i
  end do
  print*, f1(a)  ! #####
  print*, f2(a)

contains
  logical function f1( a )
  real*8, intent(in) :: a(:)
    f1 = .false.
    if (size(a) .gt. 1) f1 = .true.
  end function f1

  function f2( a ) result ( returnvalue )
  real*8, intent(in) :: a(:)
  logical :: returnvalue
    returnvalue = .false.
    if (size(a) .gt. 1) returnvalue = .true.
  end function f2
end program p1
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8182
Location: Salford, UK

PostPosted: Mon Jan 13, 2025 8:15 am    Post subject: Reply with quote

Ken

Thank you for the valued feedback.
This false error report has now be fixed for the next release of FTN95.
In the mean time, a work-around is to use /ignore 967 when using /undef in this context.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group