TXBREAK directive

Breaks up a text structure into individual words.


Option

SEPARATOR = text
Defines the characters separating the words in the original text; default ' ,;:.'


Parameters

TEXT = texts
Text to break into words

WORDS = texts
Saves the words contained in each text (in the order in which they occur)

COLUMNS = variates
Saves the number of the column in the TEXT where each word began

LINES = variates
Saves the number of the line where each word was found

PLACESINLINES = variates
Saves the place of each word (first, second &c) within the line where it was found


Description

The TXBREAK directive forms a text containing all the words (including duplicates) found in a text. The original text to break up is supplied by the TEXT parameter, and the WORDS parameter saves a text storing the words that it contains. The words are stored in the order in which they occur in the original text (but, for example, you could use the SORT directive to sort them into alphabetic order). The LINES parameter can save a variate recording the line in the original text where each one was found. The COLUMNS parameter can save variate recording the column where each word began, and the PLACESINLINES parameter can save a variate giving the place of each word (first, second &c) within the line where it was found.

   By default, the words are assumed to be separated from one another by spaces or by any of the standard punctuation characters (comma, semi-colon, colon, full stop). However, you can use the SEPARATOR option to specify some other characters. For example, you could put SEPARATOR=' ,;:.?' to allow question marks as well. These characters are all removed from the words when they are stored.

 

Option: SEPARATOR.

Parameters: TEXT, WORDS, COLUMNS, LINES, PLACESINLINES.


Action with RESTRICT

TXBREAK takes account of any restrictions on the original text, and omits the words in the restricted lines.