Returns the number of the current program line in the current program, procedure, or user-defined function (UDF).

Syntax

LINENO( )

Description

Use LINENO( ) to track program flow. Use it in conjunction with PROGRAM( ) to learn when a program executes a given line of code. You can also use LINENO( ) with ON ERROR to find out which line produces an error.

LINENO( ) is meaningful only when issued from within a program, procedure, or UDF. When issued in the Command window, LINENO( ) returns 0.

LINENO( ) always returns the actual program line number; the number doesn't reflect the order in which the line executes within the program.