Experimenting with Text File Processing

Please use the links on the left panel to access the code of the programs to modify.

  1. Add code to procedure ProcessCSVposEx of program DisplayCSV so that it formats the output to your liking.
  2. Write additional code for program DisplayCSV so that it populates a two dimensional array of string or an array of records with the data in the CSV file.
  3. Modify program DisplayCSV so that it examines the data under the header in each column to decide if that field could have been of type integer or real before it was converted to CSV.
  4. Add code to program SyntaxHighlight so that it opens Out.html with a browser automatically.
  5. Add code to program SyntaxHighlight so that it adds tags to change the colour of digits.
  6. We challenge you to add code to program SyntaxHighlight so that it adds em tags to italicise comments.
  7. Modify program progStats so that it uses ansiIndexText instead of ansiContainsText. (See program CountWords for the use of ansiIndexText).
  8. Test any of these programs with your own files.
  9. Try to write one or more of these four programs for yourself.
Programming - a skill for life!

Introduction to the string manipulation of text files