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 

Missing FTN95 intrinsic INVALID_FLOAT@()

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
mecej4



Joined: 31 Oct 2006
Posts: 1509

PostPosted: Wed Dec 23, 2020 1:16 pm    Post subject: Missing FTN95 intrinsic INVALID_FLOAT@() Reply with quote

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


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

PostPosted: Wed Dec 23, 2020 4:54 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
mecej4



Joined: 31 Oct 2006
Posts: 1509

PostPosted: Wed Dec 23, 2020 8:31 pm    Post subject: Reply with quote

Thank you, Paul.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support 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