*LINES

<< Click to Display Table of Contents >>

Navigation:  Reference > Pre-processor >

*LINES

The *LINES is used to find out whether a named file exists and if it exists how many lines are in the file.

The form of the command is:

[*LINES x=filename]

where x is any index not currently in use as a loop index (used as the index of a loop previously opened by a *DO or *FOR command which has not yet been closed).

The filename may contain any characters that are legal for a file name under the current operating system. Full path names are allowed.

The file name must include the suffix, the Pre-processor will not automatically add the suffix ".stp" to the file name if this is not included.

*LINES should never be the last command in a file; there should always be at least one line after the insert.

*LINES commands may appear in loops.

Examples of valid *LINES commands:

[*lines Present=main.stp]

[*skip 99 null Present]

[*insert main]

[*99]

 

[*lines LineCount=\files\p123.asc]

 

[*do lpLoop = 1:3]

[*lines ThisLines=file[~lpLoop]]

[*set SumLines = SumLines + ThisLines]

[*end lpLoop]