__LINE__

Top  Previous  Next

__LINE__ returns the current line number in the current source file as an integer. This is especially useful for debugging purposes.
Also see __FILE__.

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
// Show which line is being executed (this will show that line 7 is the current line)
debugFmt(message := "Current line is \1", v1:=__LINE__);
 
END_PROGRAM;