Microsoft® JScript® Skip Method |
Scripting Run-Time Reference Version 2 |
Description
Skips a specified number of characters when reading a TextStream file.
Syntax
object.Skip(characters)The Skip method syntax has these parts:
Part Description object Required. Always the name of a TextStream object. characters Required. Number of characters to skip when reading a file.
Remarks
Skipped characters are discarded.The following example illustrates the use of the Skip method:
function SkipDemo() { var fso, f, r; var ForReading = 1, ForWriting = 2; fso = new ActiveXObject("Scripting.FileSystemObject") f = fso.OpenTextFile("c:\\testfile.txt", ForWriting, true); f.WriteLine("Hello world!"); f.WriteLine("JScript is fun"); f.Close(); f = fso.OpenTextFile("c:\\testfile.txt", ForReading); f.Skip(6); r = f.ReadLine(); return(r); }