Hermetic Word Frequency Counter Embedded Comments
An input file (but not text on the clipboard) which is not a code file may contain comments. The beginning of a comment is marked by the start-comment characters specified in the Settings window, and the end of the comment is marked by the end-comment characters. If the end-comment marker is empty (blank) then the comment ends at the end of the line.
Comments are skipped when counting words. The use of start-comment and end-comment markers thus makes it possible to exclude sections of the input file from the word-counting process.
It is possible to specify two pairs of start-comment and end-comment markers. This allows both single-line comments and multi-line comments in the same input file. To take an example from C programming, // may be used as the start-comment characters for single-line comments and /* and */ may be used as the start-comment and end-comment markers for multi-line comments, specified as follows:
Then words (or variables, function names, etc., in a C program) within comments such as the following are not counted:
// This is a one-line comment.
/* This is a comment which can be
extended over several lines. */
To count words only up to and including a certain line in a text file, specify /* and */ as the start-comment and end-comment markers and insert a line consisting only of /* just after the line you wish to stop at.
When processing code files the comment markers are automatically set so that tags are ignored. This means that /* and */, or other markers, cannot be used as start-comment and end-comment markers in code files. If the start-comment and end-comment markers have been set in the Settings window then the original settings are restored after a code file has been processed.
C-style comment markers (/* ... */) can be used in the files of common words to temporarily disable sections of those files (so that the words within those sections are not treated as common words, but are counted when they occur within the input file).
Introduction User Manual: Contents Hermetic Systems Home Page