|
|||||||
@ATTACK - @PDisk.OnThis variable is used to check whether printer output has been redirected to the file by the PDISK command. If @PDISK.ON is set to 1 this indicates that the system believes that printer output is directed to file, if 0 that printer output is routed to the printer. With 2.0, AREV.EXE was modded so that if the printer is on (PRINTER ON) every print opcode checks the status of @PDISK.ON before it outputs to the printer. If false the system will check to see if a printer is on-line and if not produce a Quit or Retry message on the top line of the screen. If true, the system will just output without checking the port - assuming that all output has been directed to disk. This is a necessary distinction because if a printer is not attached printer applications may still be run using PDISK. Thus if it is required that the printer be checked programmatically before output is performed, programs should be modded as follows 0001 OK = 1 0002 IF @PDISK.ON = 0 THEN 0003 * not redirected so check that printer is alright 0004 CALL PRNSTAT(X) 0005 IF X THEN 0006 * NB Not checking for a specific number as these results do 0007 * not always seem to be reliable. Just test for the existence 0008 * of any error. 0009 OK = 0 0010 END 0011 END 0012 IF OK THEN 0013 GOSUB PRINTOUT 0014 END Note however that this technique must be used with care. @PDISK.ON is only set to 0 at logon or when a PDISK PRN is encountered. Confusion could result if a PDISK command was issued to a DOS reserved filename such as LPT2 or COM1. Under these circumstances, @PDISK.ON would be set to 1 (as PDISK considers a redirection to have taken place) which would mean that no checking would be made before PRINTs were performed, resulting in the Abort Retry Ignore Fail message. To avoid this, set @PDISK.ON to 0 programmatically. Can be amended. (Volume 2, Issue 5, Pages 9,10) |
|||||||
| |||||||