|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Tue Aug 29, 2006 9:17 am Post subject: LPT1: - is it there? |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7927 Location: Salford, UK
|
Posted: Tue Aug 29, 2006 2:00 pm Post subject: LPT1: - is it there? |
|
|
Eddie
You could try using the keyword arguments IOSTAT=var and STATUS='OLD' in the OPEN statement. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Wed Aug 30, 2006 5:13 am Post subject: LPT1: - is it there? |
|
|
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 |
|
|
|
|
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
|