|
|
|
Online Scripting Reference
|
|
read
|
Purpose
|
Reads a line of a text from a text file.
|
|
Syntax
|
read {file} storageVar {line}
{file}: The file to read text from.
storageVar: The variable to store the line in.
{line}: The line number to read.
|
|
Notes
|
This command attempts to read a line of text from a file. If the file does not exist, an error is raised. If the line is past the end of the file, 'EOF' is returned.
|
|
Example
|
# load bust list
if ($BustFile <> "")
fileExists $exists $BustFile
if ($exists)
setArray $BustList SECTORS
setVar $i 1
read $BustFile $bust $i
while ($bust <> EOF)
setVar $BustList[$bust] 1
add $i 1
read $BustFile $bust $i
end
end
end
|
Return to item listing |
|
|