``

prev Menu next

Original Enhancement (Printer)
`OPEN #Channel_Number: PRINTER`
assigns the channel to the printer.
Outputs are kept not to be transmitted to the printer until the CLOSE statement is executed.
If an ERASE statement is executed, the former output is erased.
The printer to be used in this statement is settled according to the file menu - Printer.
If PRINTER is doubly opened, an exception of extype 9004 shall be raised.
Example.

    10 OPEN #1: PRINTER
    20 SET #1: MARGIN 80
    30 FOR i=1 TO 100
    40    PRINT #1: SQR(i),
    50 NEXT i
    60 CLOSE #1
    70 END

Note.
If you want to print on real-time, output data directly to the port to which the printer is connected.
Example.

    10 OPEN #1: NAME "LPT1:"
    20 FOR i=1 TO 10
    30    INPUT n
    40    PRINT #1: n,SQR(n)
    50 NEXT i
    60 CLOSE #1
    70 END