PrintTo (open)
Write a string to any output device
Syntax
// Core function, no LOADLIB necessary
BOOLEAN FUNCTION PrintTo(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
BOOLEAN
True if the data was written succesfully, false if an I/O error occured.
Description
This function writes a string to any output device, eg. an open blob-stream, a file or a network connection.
Examples
// Create a blob containing the text 'Hello, World'.
INTEGER newblobid := CreateStream();
PrintTo(newblobid, "Hello, World");
BLOB newblob := MakeBlobFromStream(newblobid);
// Equivalent to Print("<HTML>");
PrintTo(0, "<HTML>");