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 

Fortran 2003 extensions
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Tue Aug 20, 2013 8:18 pm    Post subject: Reply with quote

The C pre-processor should work fine with both compilers.
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Aug 21, 2013 7:04 am    Post subject: Reply with quote

Kenny

/CFPP should work with FTN95 to provide C-style conditional compilation.

However, I will see if I can provide an interim fix later today so that IMPORT will be tolerated when using /F2K.

The only drawback is that FTN95 is currently "locked" for the next full release so the fix would just be off my machine and there will be a "regression" in FTN95 when you come to download the next full release.
Back to top
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 320

PostPosted: Wed Aug 21, 2013 1:37 pm    Post subject: Reply with quote

great! will you be able to do a "post release from your machine" when the time comes?

K
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Wed Aug 21, 2013 2:03 pm    Post subject: Reply with quote

Yes, if necessary but I am assuming that there will be no other changes.
So the only problem will be that the version number will be out of order.
I am guessing that it will be 6.36.x when it should probably be 7.01.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Wed Aug 21, 2013 4:18 pm    Post subject: Reply with quote

Kenny

Here is an FTN95 beta for you to try...

http://www.silverfrost.com/beta/ftn95_636.zip
Back to top
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 320

PostPosted: Wed Aug 21, 2013 4:52 pm    Post subject: Reply with quote

Excellent - seems to be working.

thank you.

now, any chance of allowing /undef to work under windows 7/64 bit? Wink

K
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Wed Aug 21, 2013 5:42 pm    Post subject: Reply with quote

In what sense does /undef not work?
Back to top
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 320

PostPosted: Tue Sep 03, 2013 8:51 am    Post subject: Re: Fortran 2003 extensions Reply with quote

KennyT wrote:
We are being reluctantly forced into producing a version of our apps built on Intel Visual Fortran and its handling of Modules is "different", such that an "IMPORT" statement (apparently an f2003 extension) is needed in various places, which is unnecessary in FTN95...

Is there any way to have the FTN95 compiler ignore any "IMPORT" statements so we can minimise the differences between our source files?

K

Further to this, another "conflict" is the syntax for STDCALL. Is there an equivalent "!" syntax for STDCALL (similar to !ftn95$free) that would be recognizable by FTN95 but ignored by IVF. IVF uses a complex sequence of !DEC$ATTRIBUTES lines, which are, thankfully, ignored by FTN95...

K

edit, I can see a reference to !FTN95$STDCALL in the help, but no example of its use and abuse - anyone used it?


Last edited by KennyT on Tue Sep 03, 2013 8:56 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
KennyT



Joined: 02 Aug 2005
Posts: 320

PostPosted: Tue Sep 03, 2013 8:52 am    Post subject: Re: Reply with quote

PaulLaidler wrote:
In what sense does /undef not work?

further to my PM, we're still trying to make the problem happen in a test routine, but it steadfastly refuses to fall over!

K
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Tue Sep 03, 2013 12:58 pm    Post subject: Reply with quote

!FTN95$STDCALL provides an alternative to F_STDCALL which is not the same as STDCALL which is used, for example, in win32api.ins to access C library functions.

If your context is an include file like win32api.ins then having a comment embedded directive for STDCALL will not help because the whole of the binding will be unacceptable to Intel Fortran.
Back to top
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 320

PostPosted: Tue Sep 03, 2013 5:42 pm    Post subject: Re: Reply with quote

PaulLaidler wrote:
!FTN95$STDCALL provides an alternative to F_STDCALL which is not the same as STDCALL which is used, for example, in win32api.ins to access C library functions.

If your context is an include file like win32api.ins then having a comment embedded directive for STDCALL will not help because the whole of the binding will be unacceptable to Intel Fortran.

Hi Paul,

we use STDCALL to access some 3rd party DLLs:

Code:

 stdcall Lexus_ 'Lexus' (STRING, REF)


in IVF, we have to put:

Code:

!DEC$ATTRIBUTES STDCALL, DLLIMPORT  :: Lexus
!DEC$ATTRIBUTES DECORATE, ALIAS:"Lexus"  :: Lexus
!DEC$ATTRIBUTES REFERENCE :: STR1, IE


which is ignored by FTN95, so i just wondered if there was an equivalent !FTN$... comment embedded version of STDCALL that would get ignored by IVF. As an equivalent example, we now have at the top of each source file:

Code:

!dec$freeform
!ftn95$free


so that both compilers recognise them as free format source.

K
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Wed Sep 04, 2013 8:05 am    Post subject: Reply with quote

I can not find anything like this in the existing comment embedded directives. It could be added and I can put it on the wish list if you like.

For the moment you would need to use conditional compilation (e.g. /CFPP).
Back to top
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 320

PostPosted: Wed Sep 04, 2013 8:59 am    Post subject: Re: Reply with quote

PaulLaidler wrote:
I can not find anything like this in the existing comment embedded directives. It could be added and I can put it on the wish list if you like.

For the moment you would need to use conditional compilation (e.g. /CFPP).

yes please.

K
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
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