| View previous topic :: View next topic |
| Author |
Message |
mecej4
Joined: 31 Oct 2006 Posts: 1943 Location: USA
|
Posted: Fri Dec 12, 2025 3:33 pm Post subject: compile time evaluation |
|
|
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 |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8320 Location: Salford, UK
|
Posted: Fri Dec 12, 2025 4:53 pm Post subject: |
|
|
mecej4
Thank you for the feedback. I have added this to the list. |
|
| Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8320 Location: Salford, UK
|
Posted: Thu Dec 18, 2025 12:47 pm Post subject: |
|
|
| This feature has been added to FTN95 for the next release. |
|
| Back to top |
|
 |
|