Equinox Online Help - Language Reference - A to Z
FileRead |
|
---|---|
Applies to | |
Syntax | FileRead HandleItem, Item1[, Item2, Item3 ... ] |
Action | [Statement] Reads a list of items in internal Equinox format from a random file. |
Scope | Usable anywhere |
Notes | This statement reads items in internal format from a file into Equinox variables or fields. A list of mixed types can be read from the file in one operation; however the types of the items in the file must match the types of variable passed as arguments. Strings are preceded by a 16-bit length and memos by a 32-bit length. This statement will not work if the file has been opened as a sequential file. The HandleItem parameter must be of Equinox variable type Handle and is the handle of the file which was opened with the FileOpen statement. After the statement has executed, SysReply contains the number of items read The system workarea SysError is set to 4 if the end of file is detected and no items were read, 1 if an error occurs, otherwise zero. |
Category | File IO |
See Also | FileClose, FileCloseAll, FileDelimiters, FileInput, FileInputLine, FileLock, FileMovePosition, FileOpen, FilePosition, FilePrint, FileRead, FileReadLine, FileReadBinary, FileReadFile, FileUnlock, FileWrite, FileWriteBinary, FileWriteFile |
Example | This example reads records from a random file and creates transaction log records in a table. NextDate and NextTranNo are fields whilst ulSectionLength is a variable. uLong ulSectionLength |