Returns the column number of the current character position in an input stream.
Arguments
- object
StdIn text stream object.
Remarks
Example
The following code demonstrates the use of the Column property by reading input from the keyboard and breaking it into lines of 20 characters.
Visual Basic Script | Copy Code |
---|
Dim Input
Input = ""
Do While Not WScript.StdIn.AtEndOfLine
Input = Input & WScript.StdIn.Read(1)
If (WScript.StdIn.Column - 1) Mod 20 = 0 Then
Input = Input & vbCrLf
End If
Loop
WScript.Echo Input |
JScript | Copy Code |
---|
var input = "";
while (!WScript.StdIn.AtEndOfLine)
{
input += WScript.StdIn.Read(1);
if ((WScript.StdIn.Column - 1) % 20 == 0)
input += "\n";
}
WScript.Echo(input); |
See Also