From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- web/clip/unix/ex01_b.asc | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 web/clip/unix/ex01_b.asc (limited to 'web/clip/unix/ex01_b.asc') diff --git a/web/clip/unix/ex01_b.asc b/web/clip/unix/ex01_b.asc new file mode 100644 index 0000000000..1c5806481d --- /dev/null +++ b/web/clip/unix/ex01_b.asc @@ -0,0 +1,42 @@ + + + + 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 to 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) ***************) -- cgit v1.2.3