Futurebasic/Language/Reference/write pound

WRITE# edit

Syntax edit

WRITE [#] deviceID,{ var | strngVar$ ; len } [,{ var | strngVar$ ; len }...]

Description edit

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.

Notes edit

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 edit