WriteSerialPortString()

Syntax

Result = WriteSerialPortString(#SerialPort, String$ [, Format])
Description
Writes a string to the specified serial port.

Parameters

#SerialPort The serial port to use.
String$ The string to write.
Format (optional) The string format to use. It can be one of the following value:
  #PB_Ascii   : the string will be written in ascii format (default, even in unicode mode).
  #PB_UTF8    : the string will be written in UTF8 format.
  #PB_Unicode : the string will be written in unicode (UTF16) format.

Return value

The number of bytes written to the serial port, or zero if the operation has failed.

Remarks

To check how much data is available in the output buffer, use AvailableSerialPortOutput().

See Also

OpenSerialPort(), WriteSerialPortData()

Supported OS

All

<- WriteSerialPortData() - SerialPort Index