Microsoft KB Archive/36356

REMLINE, Macintosh BASIC Program to Remove Unused Line Numbers PSS ID Number: Q36356 Article last modified on 04-25-1991 PSS database name: B_MQuickB

1.00 1.00a 1.00b

MACINTOSH

Summary:

A program written for QuickBASIC for Apple Macintosh is available to let you remove line numbers that are not referenced. Removing unreferenced line numbers can be an aid for analyzing, porting, or improving older BASIC programs that have unused line numbers on many lines.

The REMLINE program can be found in the Software/Data Library by searching on the keyword REMLINE, the Q number of this article, or S12059. REMLINE was archived using the PKware file-compression utility.

QuickBASIC does not come with a RENUM statement to renumber line numbers, and alphanumeric line labels are encouraged in place of line numbers. Programs are less cluttered and more structured when you use descriptive alphanumeric line labels where needed, instead of line numbers on every line.

More Information:

When only referenced line numbers are in the file, the flow of execution control is easier to trace. This may reveal “dead” code (code that is not executed), or flaws in logic.

The REMLINE program is simple and reliable; however, some care needs to be used. See the warnings in the program header. (This program is adapted from the REMLINE.BAS program that comes with the Microsoft QuickBASIC Compiler versions 4.00, 4.00b, and 4.50 for the IBM PC.)

Copyright Microsoft Corporation 1991.