Sends a string with a newline character to an output stream.
|
---|
object.WriteLine([strText]) |
Arguments
- object
StdOut or StdErr text stream objects.
- strText
Optional. String value indicating the text you want to write to the stream. If omitted, a newline character is written to the output stream.
Remarks
Example
The following code demonstrates the WriteLine method.
Visual Basic Script | Copy Code |
---|
Dim StdIn, StdOut
Set StdIn = WScript.StdIn
Set StdOut = WScript.StdOut
Do While Not StdIn.AtEndOfStream
str = StdIn.ReadLine
StdOut.WriteLine "Line " & (StdIn.Line - 1) & ": " & str
Loop |
JScript | Copy Code |
---|
var stdin = WScript.StdIn;
var stdout = WScript.StdOut;
while (!stdin.AtEndOfStream)
{
var str = stdin.ReadLine();
stdout.WriteLine("Line " + (stdin.Line - 1) + ": " + str);
} |
See Also