soccer jersey forums.silverfrost.com :: View topic - FTN95 does not allow FINDLOC for LOGICAL arrays
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 

FTN95 does not allow FINDLOC for LOGICAL arrays

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



Joined: 31 Oct 2006
Posts: 1896

PostPosted: Sun Feb 18, 2024 1:20 pm    Post subject: FTN95 does not allow FINDLOC for LOGICAL arrays Reply with quote

The FINDLOC intrinsic function was added in F2008, and it was added to the repertoire of FTN95 in 2022. The BACK optional argument was added to FTN95 in Nov. 2023. According to F2008 the required first argument, ARRAY, may be an array of any intrinsic type. FTN95, however, does not allow ARRAY to be of type logical.

Code:
program tfindloc

   implicit none
   real :: rhs(6) = (/ -2.5, -1.3, 0.0, 0.0, 0.0, 1.551E-4 /)
   integer :: ifloc

! Find the position of the first non-zero in rhs and put it in IFLOC

   ifloc = FINDLOC(abs(rhs) > 0.0, VALUE = .true., DIM = 1)
   print *,' ifmloc = ',ifloc    ! expected: 1

end program


The compiler says:

Code:
T:\HST216\ASIZN2>ftn95 tminloc.f90
[FTN95/Win32 Ver. 9.02.0.0 Copyright (c) Silverfrost Ltd 1993-2024]
ERROR T:\HST216\ASIZN2\tminloc.F90 8:  The first argument (ARRAY) to the intrinsic FINDLOC must be of INTEGER or REAL type, not LOGICAL(KIND=3)
ERROR T:\HST216\ASIZN2\tminloc.F90 8:  The second argument (VALUE) to the intrinsic FINDLOC must be of INTEGER or REAL type, not LOGICAL(KIND=3)
ERROR T:\HST216\ASIZN2\tminloc.F90 8:  The first argument of FINDLOC must not be a scalar
ERROR T:\HST216\ASIZN2\tminloc.F90 8:  Compilation abandoned


Last edited by mecej4 on Mon Feb 19, 2024 12:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Feb 19, 2024 9:55 am    Post subject: Reply with quote

mecej4

Thank you for the feedback. I have added this to the list.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Fri Mar 01, 2024 4:57 pm    Post subject: Reply with quote

FTN95 will be able to handle FINDLOC with logical arrays in the next release of FTN95 and the associated DLLs (Win32 and x64).
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