home *** CD-ROM | disk | FTP | other *** search
- DIFF -- A File Differences Program
-
-
- DIFF is a Turbo Pascal (V4.0) program which compares two text files
- and displays the differences between the two files. The differences can
- be written to an optional output file for later study or printing.
-
- The syntax for DIFF is:
-
- DIFF A file.ext B file.ext [outfile.ext]
-
- where: "A-file.ext" and "B file.ext" are the files to be compared and
- "outfile.ext" is the optional output file.
-
- DIFF is most useful for finding subtle differences between
- programs. For example, suppose that you have a copy of DIFF.PAS on your
- hard disk and another copy on a floppy disk in Drive A. They look the
- same but you think they might be different. You execute the following
- command:
-
- DIFF DIFF.PAS A:DIFF.PAS
-
- and see the following display on your screen:
-
- --------------------------------------------------------------------------
- A: 102: IF FREQ < LOFREQ
- A: 103: THEN
- A: 104: FREQ := LOFREQ
- A: 105: ELSE
- A: 106:> IF FREQ > HIFREQ THEN FREQ := HIFREQ;
- A: 107:> SOUND(FREQ);
- A: 108:> IF DUR < MINDUR
- A: 109:> THEN
- A: 110:> DUR := MINDUR
- -------------------------------------
- B: 102: IF FREQ < LOFREQ
- B: 103: THEN
- B: 104: FREQ := LOFREQ
- B: 105: ELSE
- B: 106:> IF FREQ > HIFREQ
- B: 107:> THEN
- B: 108:> FREQ := HIFREQ;
- B: 109:> SOUND(FREQ);
- B: 110:> IF DUR < MINDUR
- --------------------------------------------------------------------------
-
- The display shows that the files are different, starting at line
- 106 of the files. (Note that the A-prefix refers to the first file and
- the B-prefix refers to the second file.) The ">" points to the lines
- which differ. Trailing blank characters are ignored.
-
- After DIFF finds and displays a a block of differences, such as
- above, it attempts to "synchronize" the two files so that a missing line
- doesn't generate a list of differences to the end of both files. In the
- above example, DIFF was successful and so the differences reported above
- are the ONLY differences between the files.
-
- If you hit any key while DIFF is comparing files, DIFF will pause
- after displaying the next difference block (if any). You can then abort
- DIFF by hitting ESC or control-C, or resume processing by hitting any
- other key.
-
- Although I have taken great care in writing DIFF, I make no
- warranty as to its suitability nor usefulness for any application, use
- or purpose and I hereby specifically disclaim any responsibility for any
- loss or damage resulting from the use of this program, which is herewith
- furnished for you to use at your own risk, as you see fit.
-
-
- Harry M. Murphy, Consultant
- 3912 Hilton Avenue, NE
- Albuquerque, NM 87110
- Tel: (505) 881-0519
- 18 April 1988.
-