replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Fortran console
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 console

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



Joined: 08 Apr 2011
Posts: 155

PostPosted: Wed Nov 27, 2013 11:00 am    Post subject: Fortran console Reply with quote

I understand that a FORTRAN dll does not provide a console window.

This means, the end user (who uses my "flib" the FORTRAN object file library/FORTRAN dll) will not be able to see the console and what gets printed onto the console using the "write" statements in the FORTRAN code.

So, in a case when I want the end user using my object file library of FORTRAN or fortran dll, to see the console window, what is the best way to go about?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Nov 27, 2013 5:02 pm    Post subject: Reply with quote

The following FTN95 program provides output to a Window...

Code:
WINAPP
PRINT*, "Hello World"
END


If you are using ClearWin+ then you can create a "ClearWin" window for output or, better still, use winio@ with %cw.
Back to top
View user's profile Send private message AIM Address
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Wed Nov 27, 2013 7:50 pm    Post subject: Reply with quote

Should the print be always preceeded by WINAPP?

Because, if there are random print statements in several subroutines, should there be a winapp before each?

Can I use write instead of winapp?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Nov 27, 2013 10:08 pm    Post subject: Reply with quote

WINAPP appears once before the main PROGRAM.
Yes you can use WRITE.
Details can be found in ftn95.chm.
Back to top
View user's profile Send private message AIM Address
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Thu Nov 28, 2013 5:51 am    Post subject: Reply with quote

Thank you.

Since my code will also be used with other FOrtran compilers (like Intel Fortran compiler besides silverforst) , will winapp be applicable to other compilers as well?

IS there any other generaic way to get the console window which is applicable to all compilers?

Thanks again
Back to top
View user's profile Send private message
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Thu Nov 28, 2013 1:59 pm    Post subject: Reply with quote

PlEase can you advise? Thanks a lot
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Nov 28, 2013 5:59 pm    Post subject: Reply with quote

WINAPP will not work with other compilers. I don't know of a generic way to do this.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2923
Location: South Pole, Antarctica

PostPosted: Thu Nov 28, 2013 10:38 pm    Post subject: Reply with quote

Another option is just with not using "winapp" at all for compatibility sake. When compiling with FTN95 just add the switch /win which does the same. My disclaimer is that I don't know intimate details of compilation with other compilers
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 -> General 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