read field [#]deviceID,handleVar
This statement creates a new relocatable block in memory, reads data from the open file or serial port specified by
deviceID into the new block, and returns a handle to the block into
handleVar, which must be a long-integer variable or a
The data in the file (or coming in through the serial port) must be in a particular format in order to be read properly. The first 4 bytes (at the current "file mark" position) must be a long integer which indicates the size of the block to create. This should be immediately followed by the data which is to go into the block. This is the format in which the
write field statement writes to a file; almost always, the data you read with
read field will have been created using a
write field statement.
Your program is responsible for disposing of the handle returned in
handleVar when you're finished using the block. You can use a statement such as
kill field to do this.
write field; read file; open; kill field; DisposeH