Line Count R←50100⌶Y

This function is a compact version of the system function ⎕LC. If an expression requires only the most recent line(s) in the function calling stack, this is a more efficient alternative to using ⎕LC.

Y may be an integer specifying the depth of the function calling stack that is required in the result.

The result R is the same as ⎕LC, but truncated to the number of stack levels specified by Y.

Example

           Foo
[1]    :If 4=⍴⎕LC
[2]        501000
[3]        501001
[4]        501002
[5]        501003
[6]        501004
[7]        501005
[8]        
[9]    :Else
[10]       Foo
[11]   :EndIf
     

      Foo

3
4 10
5 10 10
6 10 10 10
7 10 10 10