WriteTo (open)

Write (part of) a string to any output device, non-blocking.

Syntax

// Core function, no LOADLIB necessary

INTEGER FUNCTION WriteTo(INTEGER outputid, STRING data)

Parameters

INTEGER outputid

Output device to write the data to. The value 0 writes it to the standard output (the same output as @italic Print)

STRING data

The string to write

Return value

INTEGER

The number of characters that was successfully written.

Description

This function writes a string to any output device, eg. an open blob-stream, a file or a network connection. If the device supports non-blocking mode, this function will return immediately. In that case, not all of the data may have been written to the device.