Writes text to an OutStream object.
|
[Written := ] OutStream.WriteText([Text[, Length]])
|
Parameters
- Text
-
The text to write. If you do not specify this, a carriage return
and a line feed are written.
- Length
-
The number of characters to be written.
Property Value/Return Value
Type: Integer
The number of characters that were written.
Example
This example requires that you create the following
variables.
Variable name |
DataType |
MyHTMLFile
|
File
|
TestOutStream
|
OutStream
|
This example also requires that the c:\TestFiles folder
exists.
|
Copy Code |
MyHTMLFile.CREATE('c:\TestFiles\main.html');
MyHTMLFile.CREATEOUTSTREAM(TestOutStream);
TestOutStream.WRITETEXT('<html>');
TestOutStream.WRITETEXT;
TestOutStream.WRITETEXT('<head>');
TestOutStream.WRITETEXT('<title>My Page</title>');
TestOutStream.WRITETEXT('</head>');
TestOutStream.WRITETEXT;
TestOutStream.WRITETEXT('<P>Hello world!</p>');
TestOutStream.WRITETEXT;
TestOutStream.WRITETEXT('</html>');
FileMyHTML.CLOSE;
|
See Also