With this syntax, the read file function returns a CFString containing the entire contents of the open file.
Important note: read file's syntax 1 must be matched with the correct openmethod for use with CFStrings. See syntax 1 for open ).
Syntax 2:
With this syntax, the read file statement reads numBytes bytes from the open file or serial port specified by deviceID (starting at the current "file mark" position), and copies them into memory starting at the address specified by address. This is the fastest way to read large amounts of data from a file; it's also well suited for reading data whose format you may not know in advance.
Important note: read file's syntax 2 must be matched with the correct openmethod for use with a pointer to a buffer. See syntax 2 for open ).
Note
If read file attempts to read past the end of the file (because numBytes> was too large), FutureBasic generates an error.