This shows you the differences between two versions of the page.
Last revision Both sides next revision | |||
getting_20the_20current_20line_20number [2018/03/31 13:19] 127.0.0.1 external edit |
getting_20the_20current_20line_20number [2018/04/17 16:30] tbest3112 Added syntax highlighting |
||
---|---|---|---|
Line 2: | Line 2: | ||
//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.\\ | //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.\\ | ||
+ | <code bb4w> | ||
12345 PRINT FN_linenumber(!384) | 12345 PRINT FN_linenumber(!384) | ||
END | END | ||
Line 9: | Line 10: | ||
WHILE ?P% AND P% + ?P% < E% P% += ?P% : ENDWHILE | WHILE ?P% AND P% + ?P% < E% P% += ?P% : ENDWHILE | ||
= (P%?2*256+P%?1) | = (P%?2*256+P%?1) | ||
+ | </code> | ||
Always pass **!384** as the parameter to FN_linenumber, this [[/Interpreter%20internal%20variables|interpreter internal variable]] is the pointer to (or within) currently-executing statement. | Always pass **!384** as the parameter to FN_linenumber, this [[/Interpreter%20internal%20variables|interpreter internal variable]] is the pointer to (or within) currently-executing statement. |