Write Statement
Writes characters to a file or communication port without end of line terminator.
Syntax
Write #portNumber, string
Parameters
- portNumber
- ID number that specifies the file or communications port. File number can be specified in ROpen, WOpen, AOpen statements. Communication port number can be specified in OpenCom (RS-232C) or OpenNet (TCP/IP) statements.
- string
- Specifies the string to be written.
Description
Write is different from Print in that it does not add an end of line terminator.
Note
About the Controllers to use
For T/VT series, an error will occur at operation when RS-232C port of the Controller is specified.
File write buffering File writing is buffered.
The buffered data can be written with Flush statement. Also, when closing a file with Close statement, the buffered data can be written.
See Also
Print, Read, WriteBin
Write Statement Example
OpenCom #1
For i = 1 to 10
Write #1, data$(i)
Next i
CloseCom #1