Microsoft KB Archive/32403

= $PAGE Metacommand Puts Page Headers in Compiler Listings =

Article ID: 32403

Article Last Modified on 11/21/2006



This article was previously published under Q32403



SUMMARY
You can use the REM $PAGE or '$PAGE metacommand to specify page headers in Macintosh QuickBASIC Compiler listing files. A listing file is created by selecting the Create Program List File option before compiling. Compiler listing files are given the extension &quot;lst&quot; by the compiler. This information applies to the Microsoft QuickBASIC Compiler Version 1.00 and the Microsoft BASIC Compiler Version 1.00 for Apple Macintosh.



MORE INFORMATION
The compiler replaces the REM $PAGE metacommand with a page header. Like other metacommands, the $PAGE metacommand must be the first word of a comment starting at the beginning of a line. If a $PAGE follows a single-quotation mark (') or REM that is not in the first column, the metacommand will be ignored.

Macintosh QuickBASIC 1.00 does NOT include a form feed character in the page header, since control characters may not be handled correctly by some text editors.

The Microsoft BASIC Interpreter Version 3.00 or QuickBASIC editor are unsuitable for printing or examining listing files. You may use the following programs to print out the program listing file:


 * 1) The &quot;Print Listing File&quot; program provided with QuickBASIC Version 1.00
 * 2) Edit (included on the compiler distribution disk)
 * 3) Microsoft Word for Apple Macintosh, or another text editor

The Print Listing File program is the most convenient because it automatically forces a new page at the beginning of a page header. If you are using Edit, Word, or another text editor, then you will have to insert page breaks yourself.

In the following example, the $PAGE metacommand is used to create a page header between the main program and the &quot;print2:&quot; subroutine when the compiler-listing (&quot; lst&quot;) file is created. You may use either '$PAGE or REM $PAGE to force a page header: FOR i = 1 TO 100 PRINT &quot;hello&quot; NEXT i GOSUB print2 END '$PAGE print2: PRINT &quot;in print2 subroutine&quot; RETURN

Additional query words: BasicCom MQuickB

Keywords: KB32403

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.