FutureBasic Logo

<<    Index    >> FutureBasic 5

write   statement



Syntax:
write[#] deviceID,{var|stringVar;len}[,{var|stringVar;len}...]

Description:
This statement writes the contents of the specified variables to the open file or serial port specified by deviceID, starting at the current "file mark" position. The variables in the list can be of any type (including record types). If you specify a string variable, it must be followed by a len parameter, which indicates the number of bytes to copy from the string. len can be any positive numeric expression whose value doesn't exceed the length of the string.
Unlike the print# statement, the write statement does not apply any formatting to the data before writing it. Instead, it simply writes an exact copy of the variables' internal bit patterns to the device. This makes the written data suitable for input by the read# statement. In general, the data written by write is not suitable for files which are to be interpreted as text.

See Also:
print#; read#; input#; open