$Input

$Input
is a global variable whose value is the name of the stream from which input to the Wolfram Language is currently being sought.

DetailsDetails

  • During the execution of <<file, $Input is set to "file".
  • During interactive input, $Input is "".

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Loading a file:

Click for copyable input

During interactive input, $Input is "":

In[1]:=
Click for copyable input
Out[1]=
Introduced in 1991
(2.0)