Writes text to an OutStream object.
[Written := ] OutStream.WriteText([Text[, Length]]) |
Parameters
- Text
- Type: Text or Code The text to write. If you do not specify this, a carriage return and a line feed are written.
- Length
- Type: Integer 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; | |






