Notitie
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen u aan te melden of de directory te wijzigen.
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen de mappen te wijzigen.
Returns the current line number in an input stream.
Syntax
object.strStream.Line
Arguments
object
WScript object.strStream
StdIn property.
Remarks
The Line property is a read-only integer.
After a stream is first opened, Line will initially be 1.
The StdIn, StdOut, and StdErr properties and methods work only when the script is run with CScript.exe. If the script is run with WScript.exe, an error occurs.
Legacy Code Example
The following code demonstrates the use of the Line property.
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
var stdin = WScript.StdIn;
var stdout = WScript.StdOut;
while (!stdin.AtEndOfStream)
{
var str = stdin.ReadLine();
stdout.WriteLine("Line " + (stdin.Line - 1) + ": " + str);
}