Silverfrost Forums

Welcome to our forums

Thank you Silverfrost.

17 Jul 2020 6:01 #26034

A big thank you to the folks at Silverfrost for adding a few more Fortran 2003/2008 features, which are now available via the Latest executables and DLLs post in this section of the forum.

! No additional compiler switches required
program test_new_2003_8_features
implicit none
integer,          parameter :: dp    = kind(1.d0)
real(kind=dp),    parameter :: pi    = 4.d0*atan(1.d0)
complex(kind=dp), parameter :: j     = cmplx(0.d0,1.d0,kind=dp)
complex(kind=dp), parameter :: sqrt3 = sqrt(3.d0)
complex(kind=dp), parameter :: a     = -0.5d0 + j*sqrt3*0.5d0

print*, 'FTN95 now allows use of intrinsic functions in parameter declarations'
print*
print*, 'pi       =  ', pi
print*
print*, 'j        =  ', j
print*, 'j*j*j*j  =  ', j*j*j*j

print*, 'a        =  ', a
print*, 'a*a*a    =  ', a*a*a
print*
print*, 'FTN95 now supports additional functions with complex arguments'
print*
print*, 'ACOS(a)  =  ',  ACOS(a)
print*, 'ASIN(a)  =  ',  ASIN(a)
print*, 'ACOSH(a) = ',   ACOSH(a)
print*, 'ASINH(a) = ',   ASINH(a)
print*, 'ATAN(a)  =  ',  ATAN(a)
print*, 'ATANH(a) = ',   ATANH(a)
print*, 'COSH(a)  =  ',  COSH(a)
print*, 'SINH(a)  =  ',  SINH(a)
print*, 'TAN(a)   =   ', TAN(a)
print*, 'TANH(a)  =  ',  TANH(a)

end test_new_2003_8_features

Ken

22 Jul 2020 6:06 #26069

I presume this requires FTN95 Ver 8.64.

Also the download FTN95 Ver 8.64 did not include ftn95.enh, which I presume indicates these extra intrinsics are available in parameter statements.

My thanks also for including this functionality.

Also, regarding the recent 8.64 updates: Have there been recent changes to clearwin.ins etc ?

22 Jul 2020 7:00 #26071

Yes it does require v8.64.

These intermediate updates don't come with enhancement files.

I will extend the sticky post to include an item for the INCLUDE and MOD files.

Please login to reply.