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 

invalid_float$ not recognised as Logical

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
StamK



Joined: 12 Oct 2016
Posts: 159

PostPosted: Sun Feb 18, 2024 8:53 pm    Post subject: invalid_float$ not recognised as Logical Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Feb 19, 2024 10:28 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit 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