Browse Prior Art Database

Method of Formatting Source Files via Automatic Compression/Expansion

IP.com Disclosure Number: IPCOM000112044D
Original Publication Date: 1994-Apr-01
Included in the Prior Art Database: 2005-Mar-26
Document File: 2 page(s) / 45K

Publishing Venue

IBM

Related People

Johnson, WJ: AUTHOR [+2]

Abstract

When editing source files, the user frequently desires to manually indent certain lines. For example, a programmer might indent each nested DO loop in order to provide easier maintenance of the code. The following example illustrates the usefulness of this technique:

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Method of Formatting Source Files via Automatic Compression/Expansion

      When editing source files, the user frequently desires to
manually indent certain lines.  For example, a programmer might
indent each nested DO loop in order to provide easier maintenance of
the code.  The following example illustrates the usefulness of this
technique:

  Unformatted code                 Formatted Code
     if (a=b) then                    if (a=b) then
     do;                                 do;
     if (x=y) then                          if (x=y) then
     do;                                       do;
     p(a) = 3 * x;                                p(a) = 3 * x;
     end;                                      end;
     else                                   else
     do;                                       do;
     counter = counter +1;                        counter = counter +
1;
     end;                                      end;
     end;                                end;
     else                             else
     exit                                 exit;

      Obviously, the formatted code on the right is much easier to
read and maintain than the unformat...