
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FORCE Data Base Compiler - ##############################################################################
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
##############################################################################
###+----------+###############################################################
#+-| PREADY() |-----------------------------------------------------------+###
#| +----------+ Returns TRUE if the print device is ready to receive data |###
#+------------------------------------------------------------------------+###
##############################################################################
##############################################################################
#+--| Summary |------------+##################################################
#| #INCLUDE io.hdr |##################################################
#+-------------------------+##################################################
##############################################################################
##############################################################################
#+--| Syntax |-------------------------------+################################
#| FUNCTION LOGICAL pready PROTOTYPE |################################
#+-------------------------------------------+################################
##############################################################################
##############################################################################
#################+---| Description |-------------------------+################
#################| The pready() function returns TRUE if the |################
#################| print device is ready to receive data. |################
#################+-------------------------------------------+################
##############################################################################
##############################################################################
##########+---| Design |-------------------------------------------+##########
##########| 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. Unless your printer conforms to these |##########
##########| standards it is possible this function might not work. |##########
##########+--------------------------------------------------------+##########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * 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 |#########
#########| ENDDO |#########
#########| LIST TO PRINT |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Continue processing while waiting for the printer. |#########
#########| |#########
#########| GOTO TOP |#########
#########| REPEAT |#########
#########| SUM REST n->count WHILE .NOT. pready() TO c |#########
#########| IF pready() |#########
#########| DO print_more |#########
#########| ENDIF |#########
#########| UNTIL eof() |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also: SET PRINT ON SET PRINTER TO
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson