You can use the index function to do this. It has the following form:
code: |
index(String, substring : string) : int |
It will return the position in which the substring is found in the string.
From Turing Help:
Quote:
This program outputs 2, because "ill" is a substring of "willing", starting at the second character of "willing".
var word : string := "willing"
put index ( word, "ill" )
If the substring is not in the string then it returns 0.
So you can read in an entire line from your text file, and then use the index function to see if it contains a specific word.