Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - pready() determine if print device is ready to receive data http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 pready()            Determine if print device is ready to receive data
------------------------------------------------------------------------------
 Declaration
   printer.hdr

 Syntax
   func logical pready extern

 Arguments
   None.

 Return
   A logical indicating if the print device is ready.

 Description
   The pready() function returns .t. if the print device is ready to
   receive data.

   The pready() function uses a BIOS call to detect if a printer is on line,
   or, if a printer has been set to a DOS handle other than STD_PRN, uses
   DOS's IOCTL functions. The function operates correctly with those printers
   that conform to these standards.

 Example
   #define EXAMPLE_IO
   #include example.hdr

   proc Test_pready
   // Tell the operator to check the printer
   do while .not. pready()
      ? "Check the printer to verify that it has paper and is on line."
      wait
      if lastkey() == K_ESC
         ? "Printing cancelled"
         exit
      endif
   enddo
   if lastkey() != K_ESC
      // do the print here
   endif
   endproc

   proc main
   Test_pready()
   endproc

See Also: npready()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson