Scripting Additions Guide

CHAPTER 2
Scripting Addition Commands
Command Definitions 49
SYNTAX
read referenceToFile
[ from startingByte
] ¬
[ for bytesToRead | to byteToReadTo ¬
| until delimiterIncluded | before
delimiterExcluded ] ¬
[ as className [ using delimiter[s] delimiters ] ]
PARAMETERS
referenceToFile
A reference of the form file nameString or alias nameString,
or a file reference number previously obtained with the Open
for Access command (see “Notes”).
Class: Reference or integer
startingByte The offset of the byte from which to begin reading. A positive
integer indicates the offset from the beginning of the file, and a
negative integer indicates the offset from the end of the file.
Class: Integer
bytesToRead The number of bytes to read. If the from startingByte parameter
is included, the Read command reads bytesToRead bytes starting
at the specified starting point; otherwise, the Read command
begins reading at the file mark. If the value of this parameter is
negative, an error occurs.
Class: Integer
byteToReadTo The offset of the byte to read to. If the from startingByte
parameter is included, the Read command reads from the
specified starting point to byteToReadTo; otherwise, the Read
command begins reading at the file mark. A positive integer
indicates the offset from the beginning of the file, and a negative
integer indicates the offset from the end of the file.
Class: Integer
delimiterIncluded
A delimiter (such as a tab or return character) to read to. The
specified delimiter is included in the read (unless it is an
end-of-file delimiter, which is not included). If the from
startingByte parameter is included, the Read command reads