Home > Language Reference > System Variables > CurrentLine

#CurrentLine

The #CurrentLine system variable returns the current line number within the currently running script.

Syntax

var=#CurrentLine

Return value

var, integer, current line number within the current script.

Example

var = #CurrentLine

'Convert the integer to a string and use msgbox function to display it
var$=str$(var)
msgbox(var$)