Control Characters to Reset Page Length for Multi-Page LLIST (20522)



The information in this article applies to:

  • Microsoft QuickBASIC 1.0
  • Microsoft QuickBASIC 1.0a
  • Microsoft QuickBASIC 1.0b
  • Microsoft BASIC Compiler
  • Microsoft BASIC Interpreter for Apple Macintosh 1.0
  • Microsoft BASIC Interpreter for Apple Macintosh 1.01
  • 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 Q20522

SUMMARY

When sending more than one page of output to the Apple ImageWriter printer with the LLIST statement, the printer prints continuously. To specify page breaks for a tidier printout, you can reset the number of lines printed per page using control codes.

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

MORE INFORMATION

The following program resets the number of lines printed per page to 60 on the ImageWriter Printer. LLIST then creates a multi-page listing that does not print over the perforations between sheets of paper. (See Page 64 of the ImageWriter reference manual for further information on the printer control codes.)
WIDTH LPRINT 255    'Sets infinite printer line width, suppressing RETURN.
TF$=CHR$(29)+"A@"   'Codes to set starting top of form (TOF).
BF$="C@"            'Codes to set bottom of form (BOF).
NF$="A@"+CHR$(30)   'Codes to set top of next form.
LPRINT TF$;         'This and the next line set top of form (TOF)
FOR I=1 TO 58 : LPRINT "@@"; : NEXT I
LPRINT BF$;         'This and the next line set bottom of form (BOF)
FOR I=1 TO 6 : LPRINT "@@"; : NEXT I
LPRINT NF$          'Sets top of next form.
'Demonstrate the new page length:
WIDTH LPRINT 80     'Enable RETURNs at 80th character (or as desired).
LPRINT CHR$(12);    'Do a form feed, since first line had control chars.
FOR J=1 TO 75 : LPRINT J : NEXT I   'Tests the new page length.
				

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