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 

Printing from Salford FTN95 application

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





PostPosted: Tue Oct 11, 2005 1:46 am    Post subject: Printing from Salford FTN95 application Reply with quote

Colleagues,

I am at the last stages of developing an application using Salford FTN95. I am stuck at the stage of trying to print the output from within the application. I haved added a print menu on the output screen and it successfully invokes the printer dialog box. However, when I print, nothing comes out. I guess I need to add some lines that allows the program to read the output on the screen and output it on the printer. Your assistance would be appreciated.


S. Bah
Back to top
PaulLaidler
Site Admin


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

PostPosted: Tue Oct 11, 2005 1:16 pm    Post subject: Printing from Salford FTN95 application Reply with quote

If you have a local default printer configured to port LPT1 then you may be able to use the Fortran OPEN command. Then you would not need the Open Printer dialog. Look in FTN95.chm and Search for LPT1 for further information.

Then next simplest approach is described with an example in the FTN95 help file under Win32 Platform/ClearWin+/Using the Printer/Selecting a printer. A quick way to find this is to Search for PRINTER_OPEN.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Tue Oct 11, 2005 3:08 pm    Post subject: Printing from Salford FTN95 application Reply with quote

I found that using this WINIO@ function call:

IA=WINIO@('%nl%rj%10^bt[&Print]&', 'PRINTER_OPEN', 10,
+ Prin_FUNCTION)

(There is the related stuff from a Menu too)

I was able to connect logical unit No. 10 (lun=10) to a printer (the printer_open call back allows you to select which one via a standard Window). It DOES NOT require a conventional FORTRAN OPEN statement. My user defined call-back function Prin_FUNCTION simply does all the printing with standard formatted Fortran WRITE statements, all directed to lun 10. Just before the RETURN in this function, I issue a CLOSE (10) command, which definitely sends everything to the printer, and frees up the printer for other processes.

There is another standard call back that simply connects you to the default printer - call that one the next time round to save the user the bother of selecting a printer again.

Eddie B.
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