37
Example
:
Read the entire contents of a file called data.txt into a string variable.
textfile tf
string data
int size
tf.Open("c:\data.txt", FALSE)
size = tf.GetSize()
data = tf.Read(size)
tf.Close()
The string variable named data now contains the contents of the text file.
See the “Script Reference” for a complete list of all TextFile methods. For an example of using a textfile
in a script, see “Repetitive Statements” on page 52.