replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - CAST to REAL/INTEGER in array constructor
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 

CAST to REAL/INTEGER in array constructor

 
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: 813
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Thu May 22, 2025 10:48 am    Post subject: CAST to REAL/INTEGER in array constructor Reply with quote

FTN95 version 8.95 added cast to CHARACTER(LEN=n) or to REAL within an array constructor. However the write statements in the code below show that the type conversion from integer to real is not occurring.
Code:
program p
implicit none
write(*,*)         [real :: 1,2,3] ! FTN95 prints integers not reals
write(*,'(3F6.3)') [real :: 1,2,3] ! Runtime error with FTN95 - format mismatch
end program p


Casting to integer is not supported in FTN95, perhaps this could be added to the wish-list? It was a program with the following call which caused me to look at this:

CALL SUB1([integer :: ])

i.e. SUB1 has as input an integer array of size zero (which does make sense following the programmer's methodology)!
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat May 24, 2025 7:10 am    Post subject: Reply with quote

Ken

Thank you for the feedback. I have logged these issues for investigattion.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Sat May 24, 2025 2:24 pm    Post subject: Reply with quote

These issues have now been fixed for the next release of FTN95.
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