Skips the next line when reading from an input text stream.
Arguments
- object
StdIn text stream object.
Remarks
Example
The following code demonstrates the SkipLine method.
Visual Basic Script | Copy Code |
---|
Dim StdIn, StdOut, Str1, Str2
Set StdIn = WScript.StdIn
Set StdOut = WScript.StdOut
Str1 = ""
Str2 = ""
For i = 0 to 4
StdIn.SkipLine
Next
i = 0
Do While Not StdIn.AtEndOfStream
If i >= 2 Then
StdOut.WriteLine Str1
End If
i = i + 1
Str1 = Str2
Str2 = StdIn.ReadLine
Loop |
JScript | Copy Code |
---|
var stdin = WScript.StdIn;
var stdout = WScript.StdOut;
var str1, str2 = "";
var i;
for (i = 0; i < 5; i++)
stdin.SkipLine();
i = 0;
while (!stdin.AtEndOfStream)
{
if (i++ >= 2)
{
stdout.WriteLine(str1);
}
str1 = str2;
str2 = stdin.ReadLine();
} |
See Also