HTBasic Help
×
Menu
Index

PRT

Returns the default device selector for the printer.
 
 PRT
 
Usage:
PRINTER IS PRT
PRINT "Default PRT is",PRT
 
Example:           PRT.BAS
 
Description:
The PRT function returns a constant representing the conventional printer interface select code. PRT exists to provide a useful mnemonic for the most common device selector for a printer. While PRT returns the conventional device selector for a printer, any legal device selector may be used in place of PRT in the PRINTER IS command (see PRINTER IS). The following are several common examples:
 
PRINTER IS 9     !serial printer
PRINTER IS CRT   !the display
PRINTER IS 70102 !2 IEEE-488 printers
 
PRT returns the constant 10. This is different from HP BASIC, which returns the constant 701. On the PC, most printers are connected to the parallel printer port, making 10 the most common printer device selector. With HP BASIC, most printers are connected to the HP-IB interface and have a primary address of 1, making 701 the most common printer device selector. To provide compatibility with existing software, the HTBasic PRT can be redefined to 701 (or any other value) with the CONFIGURE PRT statement.
 
See Also: