View previous topic :: View next topic |
Author |
Message |
mecej4
Joined: 31 Oct 2006 Posts: 1888
|
Posted: Wed Dec 23, 2020 1:16 pm Post subject: Missing FTN95 intrinsic INVALID_FLOAT@() |
|
|
The FTN95 8.70 help file contains descriptions of the non-standard intrinsic functions INVALID_FLOAT@ and INVALID_DOUBLE@, but I do not see them in the online documentation at https://silverfrost.com/ftn95-help/ftn95/idh_i.aspx.
The following code, in which I attempted to implement the Fortran standard function ISNAN using this intrinsic function, failed to compile.
Code: | LOGICAL FUNCTION ISNAN(X) ! provided for Silverfrost FTN95, which lacks ISNAN
real X
isnan = invalid_float@(X)
return
end function ISNAN |
The compiler said:
Code: | R:\XLRTR\MARCH\SRC>ftn95 isnan.f90
[FTN95/Win32 Ver. 8.70.0 Copyright (c) Silverfrost Ltd 1993-2020]
ERROR R:\XLRTR\MARCH\SRC\isnan.F90 3: You cannot assign an expression of type INTEGER(KIND=3) to a variable of type LOG
ICAL(KIND=3)
1 ERROR [<ISNAN> FTN95 v8.70.0]
*** Compilation failed |
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7931 Location: Salford, UK
|
Posted: Wed Dec 23, 2020 4:54 pm Post subject: |
|
|
mecej4
These routines require
INCLUDE <clearwin.ins>
or similar, or
Code: | C_EXTERNAL INVALID_FLOAT@ 'invalid_float'(VAL):LOGICAL*4
C_EXTERNAL INVALID_DOUBLE@ 'invalid_double'(VALD):LOGICAL*4
|
|
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1888
|
Posted: Wed Dec 23, 2020 8:31 pm Post subject: |
|
|
Thank you, Paul. |
|
Back to top |
|
|
|