getting_20the_20current_20line_20number
This is an old revision of the document!
Getting the current line number
by Jon Ripley, Richard Russell, January 2012
The FN_linenumber(!384) function returns the line number of the currently executing line of code as demonstrated below.
12345 PRINT FN_linenumber(!384) END DEF FN_linenumber(E%) LOCAL P% : P% = PAGE WHILE ?P% AND P% + ?P% < E% P% += ?P% : ENDWHILE = (P%?2*256+P%?1)
Always pass !384 as the parameter to FN_linenumber, this interpreter internal variable is the pointer to (or within) currently-executing statement.
getting_20the_20current_20line_20number.1523982627.txt.gz · Last modified: 2024/01/05 00:17 (external edit)