summaryrefslogtreecommitdiff
path: root/web/clip/unix/ex01_b.asc
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /web/clip/unix/ex01_b.asc
Initial commit
Diffstat (limited to 'web/clip/unix/ex01_b.asc')
-rw-r--r--web/clip/unix/ex01_b.asc42
1 files changed, 42 insertions, 0 deletions
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) ***************)