Product SiteDocumentation Site

7.4.58. SOURCELINE


>>-SOURCELINE(--+---+--)---------------------------------------><
                +-n-+

Returns the line number of the final line in the program if you omit n. If you specify n, returns the nth line in the program if available at the time of execution. Otherwise, it returns a null string. If specified, n must be a positive whole number and must not exceed the number that a call to SOURCELINE with no arguments returns.
If the Rexx program is in tokenized form the this function raises an error for all attempts to retrieve a line of the program.
Here are some examples:

Example 7.72. Builtin function SOURCELINE

SOURCELINE()    ->   10
SOURCELINE(1)   ->   "/* This is a 10-line Rexx program */"