View previous topic :: View next topic |
Author |
Message |
StamK
Joined: 12 Oct 2016 Posts: 159
|
Posted: Sun Feb 18, 2024 8:53 pm Post subject: invalid_float$ not recognised as Logical |
|
|
I am trying to compile the following in 64bit but I am getting the error
0004) if( invalid_float$(x)) then
*** Error 420: The condition in an IF statement should be LOGICAL
Code: | LOGICAL FUNCTION Q_Is_RNull (X)
USE mswin$
REAL :: X
if( invalid_float$(x)) then
END IF
Q_Is_RNull = .false.
END FUNCTION |
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Mon Feb 19, 2024 10:28 am Post subject: |
|
|
StamK
If you are using \FTN95\source64\clrwin.f95 in order to create clrwin$ and hence mswin$ then you wil find that invalid_float$ is commented out in the source code.
You can either remove the commenting out or provide an explicit interface in your code...
Code: | interface
function invalid_float$(f) bind(C,Name='invalid_float')
use ISO_C_BINDING
logical(C_BOOL)::invalid_float$
real(C_FLOAT),value::f
end function invalid_float$
end interface
|
I have fixed this for the next full release. |
|
Back to top |
|
|
|