Below, you can find another hint for the Challenge.
You should only get here after reading, digesting, and applying the .
You tried to include the program fragment for marker processing in the string literal, and it failed? Did you understand why it failed? That may not have been obvious. So, let's look into this.
This is the program fragment for marker processing:
Putting that inside the string literal directly will cause trouble, because the program fragment contains another string literal, viz. '|'. And that will not work, because we cannot put quotes directly inside the string literal.
What now?
There are several ways out. One approach is to treat quotes like newlines, by putting a quote marker in the string literal instead of an actual quote. The program fragment that processes markers will then also have to recognize the quote marker and translate it into a call of writequ(), just like the newline marker triggers a call of writeln().
There is also a sneaky alternative, based on a creative insight. Think about it.
Can you develop one of these ideas into a better solution?
Try your program in the machine, and see if you can extend it to a complete solution.
It is your turn ...
If you tried this hint, or do not see how it helps, then you are ready for the .