View previous topic :: View next topic |
Author |
Message |
christyleomin
Joined: 08 Apr 2011 Posts: 155
|
Posted: Wed Nov 27, 2013 11:00 am Post subject: Fortran console |
|
|
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 |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Wed Nov 27, 2013 5:02 pm Post subject: |
|
|
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 |
|
 |
christyleomin
Joined: 08 Apr 2011 Posts: 155
|
Posted: Wed Nov 27, 2013 7:50 pm Post subject: |
|
|
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 |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Wed Nov 27, 2013 10:08 pm Post subject: |
|
|
WINAPP appears once before the main PROGRAM.
Yes you can use WRITE.
Details can be found in ftn95.chm. |
|
Back to top |
|
 |
christyleomin
Joined: 08 Apr 2011 Posts: 155
|
Posted: Thu Nov 28, 2013 5:51 am Post subject: |
|
|
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 |
|
 |
christyleomin
Joined: 08 Apr 2011 Posts: 155
|
Posted: Thu Nov 28, 2013 1:59 pm Post subject: |
|
|
PlEase can you advise? Thanks a lot |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Thu Nov 28, 2013 5:59 pm Post subject: |
|
|
WINAPP will not work with other compilers. I don't know of a generic way to do this. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Thu Nov 28, 2013 10:38 pm Post subject: |
|
|
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 |
|
 |
|