This page is "browser friendly". Make your browser window as wide as you want it. The text will flow nicely for you. It is easier to read in a narrow window. With most browsers, pressing plus, minus or zero while the control key (ctrl) is held down will change the texts size. (Enlarge, reduce, restore to default, respectively.) (This is more fully explained, and there's another tip, at my Power Browsing page.)
This is an unusal "tutorial" in that (for now... and probably some time to come) I am giving away the sourcecode, but not doing a lot of explaining.
I've tested what follows in Lazarus. I cannot thinl of any reason it would not work just as well under Delphi.
When you run the application you are invited to load a file. Once you have loaded it, if you click the "massage" button, the program will go through the file, and, only inside any >pre<>/pre< blocks, it will change any >s to >, any <s to < and any &s to &s
Of you clicked the "Massage And Overwrite" button, your original file will be over-written... without an "are you sure?" prompt. So be careful. Work with copies of important files.
Why would you want such a application? Well, if you, like me, write tutorials for the web with things like...
if x>5 then...
... in them, then maybe you too will find the program useful.
In more general terms, even if you don't need the application to use in anger, it has examples of using nested loops, boolean "flag" variables to control the execution of elements of the program, and subroutines (with and without passed variables) to "divide and conquer" a problem.
As I said, I am not going to write much of a "tutorial" to go with this sourcecode, but I commend the problem to you. It wasn't easy to write even a badly written program to do the job. Try it, if you like a challenge.
A zip file is available to you, with both the sourcecode of the application, and a pre-compiled .exe file for immediate use.
Beware one little "rough edge": You can do a "Massage and overwrite" before doing a "Load file"... but you shouldn't: the application doesn't yet know WHERE, or under WHAT NAME to save what is in the memo! (I'm not sure what happens if you try it!
If you visit 1&1's site from here, it helps me. They host my website, and I wouldn't put this link up for them if I wasn't happy with their service. They offer things for the beginner and the corporation.
Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org. Mostly passes. There were two "unknown attributes" in Google+ button code. Sigh.
....... P a g e . . . E n d s .....