User Tools

Site Tools


getting_20the_20current_20line_20number

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
getting_20the_20current_20line_20number [2018/04/17 16:30] – Added syntax highlighting tbest3112getting_20the_20current_20line_20number [2024/01/05 00:22] (current) – external edit 127.0.0.1
Line 7: Line 7:
  
         DEF FN_linenumber(E%)         DEF FN_linenumber(E%)
-        LOCAL P% : P% = PAGE +        LOCAL p%% : p%% = PAGE 
-        WHILE ?P% AND P% + ?P% < E% P% += ?P% : ENDWHILE +        WHILE ?p%% AND p%% + ?p%% < (E% + PAGE - !340) p%% += ?p%% : ENDWHILE 
-        = (P%?2*256+P%?1)+        = (p%%?2*256+p%%?1)
 </code> </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.
getting_20the_20current_20line_20number.1523982627.txt.gz · Last modified: 2024/01/05 00:17 (external edit)