CurrentLineIndex

Top  Previous  Next

Returns the index of the current line in the text file.

 

Syntax:

function CurrentLineIndex: Integer;

 

Description:

As you write text into a text file using the WriteLine and WriteText methods, you can use this method to return the current line index.  You can then later insert additional text into those lines using the InsertLine function.  This allows you to first create a tag, store the line number, continue writing to the file, and later return to the location of the tag to insert additional text.

 

The return value is 0-based, so the first line index is 0, the second line is 1, and so forth.

 

Example:

 

scripting_ttextfile_currentlineindex