fileWrite
|
The fileWrite function writes data from the specified ByteVector Object to
a data file. This function always returns the number of bytes written or an error
if there was a problem. Usage Data is entered into a file with the fileWrite, fwriteln, or fdisplay
functions, however, records are not actually committed to the file until the file
is closed. Thus, attempting to read a record immediately after a fileWrite or
fdisplay will result in an error. In order to verify records that have been
written, it is necessary to close the file and save the file (fileClose
with an option argument equal to 1) . The file can then be re-opened and read
with the fileRead function.
(fileWrite fileID offset length bytevector) (fileWrite fileID bytevector) The fileWrite function returns the number bytes written.
Expression:
Arguments
Name
Type
Description Argument: fileID Integer
An Integer representing the fileID of the file returned from a previous
fileOpen function. Argument: offset Integer
Optional. The integer index into the specified ByteVector where the
data stream is to start . If no offset is specified, the offset defaults to zero. Argument: length Integer
Optional. The integer length of data which is to be read into the specified
ByteVector. If no length is specified, the length defaults to the length to the
end of the file. Argument: bytevector ByteVector
Optional. The ByteVector into which the data is to be written. If no ByteVector
is specified, one will be created.
Returns:
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Here are the links to the data types of the function arguments.
ByteVector | Text | Integer | Boolean |
Here are also a number of links to functions having arguments with any of these data types.
Analytic Information Server (AIS)AIS Component Systems
|