No LPRINT, LLIST, "LPT1: DIRECT" Allowed in AppleTalk Network (28982)



The information in this article applies to:

  • Microsoft QuickBASIC 1.0
  • Microsoft BASIC Compiler
  • Microsoft BASIC Interpreter for Apple Macintosh 2.0
  • Microsoft BASIC Interpreter for Apple Macintosh 2.1
  • Microsoft BASIC Interpreter for Apple Macintosh 3.0

This article was previously published under Q28982

SUMMARY

This information applies to Microsoft QuickBASIC Version 1.00, Microsoft BASIC Compiler Version 1.00, and Microsoft BASIC Interpreter Versions 2.00, 2.10, and 3.00 for the Apple Macintosh.

Macintosh BASIC does not support LPRINT, LLIST, or output to the device "LPT1:DIRECT" over the AppleTalk network. BASIC can only send graphics mode output over the network. BASIC cannot send character mode output over the network.

To output from BASIC to a printer through the AppleTalk network, output to the "LPT1:" or "LPT1:PROMPT" device name. Select Printer Chooser from the Apple menu.

To print a program listing over the AppleTalk Network, select Print from the File menu instead of using LLIST.

Note that you must have the BASIC interpreter Version 3.00, the BASIC compiler Version 1.00, or QuickBASIC Version 1.00 to output to the Apple LaserWriter printer. The BASIC interpreter Versions 1.00, 1.01, 2.00, and 2.10 cannot output to the Apple LaserWriter.

MORE INFORMATION

To output to a printer on the AppleTalk Network, OPEN the device "LPT1:" or "LPT1:PROMPT" FOR OUTPUT AS #n and use PRINT#n or WRITE#n to output (where n is any arbitrary file number between 1 and 255).

WINDOW OUTPUT #n can be used to redirect to the printer what would have gone to the screen. However, PRINT and WRITE statements must be used instead of PRINT#n or WRITE#n when WINDOW OUTPUT #n redirection is in effect. The WINDOW OUTPUT #n redirection ends as soon as you perform CLOSE#n or a general CLOSE.

Code Examples

To open the device "LPT1:" or "LPT1:PROMPT" for output, use the following:
OPEN "LPT1:PROMPT" FOR OUTPUT AS #1
PRINT #1,"This goes to the networked printer"
WRITE #1,"This goes to the networked printer"
CLOSE #1
				
To use WINDOW OUTPUT #n to redirect window output to the printer, use the following:
OPEN "LPT1:PROMPT" FOR OUTPUT AS #1
WINDOW OUTPUT #1
CALL TEXTFONT(4) : CALL TEXTSIZE(9)
PRINT "MONACO FONT REDIRECTED FROM SCREEN TO PRINTER"
LINE (20,20)-(50,50)    ' This drawn line goes to the printer.
CLOSE #1
				

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB28982