Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Writes text to an OutStream object.
Syntax
[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.
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>');
MyHTMLFile.CLOSE;