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 

Issue with version 9.20

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



Joined: 06 Jun 2016
Posts: 43

PostPosted: Fri Dec 19, 2025 1:52 pm    Post subject: Issue with version 9.20 Reply with quote

Hello
The following subroutine fails on compilation with an error stating that key(*) is not allowed in this context. There was no problem with previous versions. It states the error is in this subroutine, but in fact it gives a line number indicating the position in the code where the failure occurs which is in the previous routine in the code, i.e. the line number is incorrect.

subroutine parseKeys(buffer,key)
implicit none
character*(*) buffer
integer i,j,k,success,key(*)

key = 0
k = 0
do i=1,LEN_TRIM(buffer)
if(buffer(i:i) == ' ') cycle
k = k + 1
read(buffer(i:i),'(i1)',iostat=success) j
if(success /= 0) return
key(k) = j
enddo
end
Back to top
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 868
Location: Lanarkshire, Scotland.

PostPosted: Fri Dec 19, 2025 2:08 pm    Post subject: Reply with quote

FTN9.20 is correct as whole-array operations are not allowed on an assumed size array here key(*), so change this to an assumed shape array key( : ), remembering that assumed-shape arrays require an explicit interface to the caller.

Last edited by Kenneth_Smith on Fri Dec 19, 2025 2:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
ljfarrugia



Joined: 06 Jun 2016
Posts: 43

PostPosted: Fri Dec 19, 2025 2:09 pm    Post subject: Reply with quote

In a follow up to the previous comment, using version FTN95 9.0 the point of the error is actually given at the line

2914) key = 0
*** An assumed size array (bound of *) is not permitted in this context
1 ERROR [<PARSEKEYS> FTN95 v9.00.0]

which perhaps is making more sense, but I'm not sure why there is now an error, whereas in earlier version there was no compilation error.

In addition, I find that both FTN95 versions 9.0 & 9.2 give some strange warning messages, for example

4454) recursive subroutine rdInclude1(io,iout,filen)
WARNING - In a call to RDINCLUDE1 from another procedure, the first argument was of type INTEGER(KIND=3), it is now INTEGER(KIND=3)
WARNING - In a call to RDINCLUDE1 from another procedure, the second argument was of type INTEGER(KIND=3), it is now INTEGER(KIND=3)

Its complaining that the argument is the same in both calls?????
An additional problem with version 9.20 over 9.0 is that the line numbers are incorrect in 9.20, but correct in 9.0

Louis
Back to top
View user's profile Send private message
ljfarrugia



Joined: 06 Jun 2016
Posts: 43

PostPosted: Fri Dec 19, 2025 2:14 pm    Post subject: Reply with quote

Thanks Kenneth
I changed key(*) to key(MAXSCALE+Cool which was the declared size in the previous routine, which luckily was the only routine calling the problem subroutine, so the change was trivial and easy.

The problem of version 9.20 reporting wrong line numbers for errors and warnings remains and this makes it difficult tracking down such issues.

Louis
Back to top
View user's profile Send private message
ljfarrugia



Joined: 06 Jun 2016
Posts: 43

PostPosted: Fri Dec 19, 2025 2:16 pm    Post subject: Reply with quote

Sorry don't know why emoji appears, I meant MAXSCALE+8
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1936
Location: USA

PostPosted: Fri Dec 19, 2025 5:15 pm    Post subject: Reply with quote

Try setting "smilies" to OFF in your forum profile.
Back to top
View user's profile Send private message
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