Example 01: Testcode





This section contains some test code that can be inserted to debug the
palindrome filter program.


B.1.  Print the contents of IN_LINE and LETTERS

Correct reading of the input is crucial. For debugging purposes we may want to
inspect the contents of *IN_LINE* and *LETTERS*. We need a local counter

   (*******    Palindrome variables              #quick  *******)
       T :         INTEGER;

We want the debugging information te be clearly flagged as such.

   (*****************  Palindrome (test)  ******************)
   (** Check contents of IN_LINE and LETTERS.             **)
   WRITELN;
   WRITELN ('============  DEBUGGING INFORMATION  ===============');
   WRITELN ('Contents of buffer IN_LINE: ');
   WRITE   ('>>>>');
   WITH IN_LINE DO
   FOR T := 1 TO LENGTH DO WRITE (OUTPUT, CHARS[T]);
   WRITE   ('<<<<');
   WRITELN;
   WRITELN ('Contents of buffer LETTERS:  ');
   WRITE   ('>>>>');
   WITH LETTERS DO
   FOR T := 1 TO LENGTH DO WRITE (OUTPUT, CHARS[T]);
   WRITE   ('<<<<');
   WRITELN;
   WRITELN ('==========  END OF DEBUGGING INFORMATION  ==========');
   WRITELN;
   (*************  End of Palindrome (test)  ***************)