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 

compile time evaluation

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



Joined: 31 Oct 2006
Posts: 1943
Location: USA

PostPosted: Fri Dec 12, 2025 3:33 pm    Post subject: compile time evaluation Reply with quote

Paul, F2008 permits some calculations to be made at compile time. Here is an example program:
Code:
program ctitst
implicit none
integer, parameter :: N=4
integer :: i
integer,parameter :: sqr(*)=[(i*i,i=1,N)]
print *,sqr
end program ctitst


FTN95 rejects the declaration/initialisation of sqr():

Code:
ERROR S:\sieve\ctitst.F90 5:  An assumed size array (bound of *) is not permitted in this context


Thank you.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Dec 12, 2025 4:53 pm    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: 8320
Location: Salford, UK

PostPosted: Thu Dec 18, 2025 12:47 pm    Post subject: Reply with quote

This feature has been added to FTN95 for the next release.
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 -> Suggestions 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