Skip to content

In

In(k)

gives the kth line of input.

Examples

>> x = 1
1
>> x = x + 1
2
>> Do(In(2), {3})
>> x
5
>> In(-1)
5
>> Definition(In)
Attributes(In)={Listable,NHoldFirst,Protected}
In(1):=x=1
In(2):=x=x+1
In(3):=Do(In(2),{3})
In(4):=x
In(5):=In(-1)

Implementation status

  • ☑ - partially implemented

Github