Scripting Additions Guide

CHAPTER 2
Scripting Addition Commands
50 Command Definitions
from the specified starting point to the specified delimiter;
otherwise, the Read command begins reading at the file mark.
Class: String
delimiterExcluded
A delimiter (such as a tab or return character) to which to read.
The specified delimiter is not included in the read. If the from
startingByte parameter is included, the Read command reads
from the specified starting point to the specified delimiter;
otherwise, the Read command begins reading at the file mark.
Class: String
className The class of the data to be read. The Read command reads the
number of bytes appropriate for a value of the class specified by
this parameter. (For details, see “Notes” later in this definition.)
Class: Class
delimiters If the data being read is text-based, you can use this parameter
to specify the delimiters the Read command should use when
interpreting the data as values of the class specified by className.
(For details, see “Notes” later in this definition.)
Class: String or constant, or a two-item list of strings or constants
RESULT
If the Read command is successful, it returns the data read from the file as text
(unless specified otherwise by the as parameter).
EXAMPLES
This example reads MyFile from the 12th byte and to the end of the file.
read file "Hard Disk:MyFile" from 12
The next example reads MyFile from the 12th byte before the end of the file to
the end of the file.
read file "Hard Disk:MyFile" from -12
The next example reads 24 bytes of MyFile starting at the 12th byte. If the end
of the file is reached before 24 bytes have been read, an error is returned.
read file "Hard Disk:MyFile" from 12 for 24