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 

LPT1: - is it there?

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



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

PostPosted: Tue Aug 29, 2006 9:17 am    Post subject: LPT1: - is it there? Reply with quote

I've got a program that writes direct to LPT1: - basically, the code contains an OPEN(99,'LPT1:') followed by lots of formatted writes. The point of this is to send raw commands of the form "Pen Up", "Pen Down", "Move to these coords" etc to a connected pen plotter.

My new laptop doesn't have a parallel port, and invoking this sequence of commands causes the program to become unresponsive (old laptop with LPT1: queues all the commands if the port isn't actually connected to the plotter).

Is there an easy way to tell if the computer in question has an LPT1: port*, and so I could just skip the plotter stuff? (I do have code for generating the same plots using a standard installed Windows printer, so that the pen-plotter code is of largely historical interest, and one solution is simply to delete it).

I've noticed that floppy drives and COM ports also seem to be disappearing from PCs.

Eddie

*Apart, that is, from asking the user to look round the back!

Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Aug 29, 2006 2:00 pm    Post subject: LPT1: - is it there? Reply with quote

Eddie

You could try using the keyword arguments IOSTAT=var and STATUS='OLD' in the OPEN statement.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



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

PostPosted: Wed Aug 30, 2006 5:13 am    Post subject: LPT1: - is it there? Reply with quote

I'll try that. I suppose I'm still contaminated with MS Fortran, which didn't treat standard devices completely like files.

Thanks

Eddie
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