Silverfrost Forums

Welcome to our forums

LPT1: - is it there?

29 Aug 2006 8:17 #965

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!

29 Aug 2006 1:00 #966

Eddie

You could try using the keyword arguments IOSTAT=var and STATUS='OLD' in the OPEN statement.

30 Aug 2006 4:13 #968

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

Thanks

Eddie

Please login to reply.