({{, (RefLink[Input, paclet:ref/Input])[]
interactively reads in one Wolfram Language expression. }, {, (RefLink[Input, paclet:ref/Input])[prompt]
requests input, displaying prompt as a "prompt".}, {, (RefLink[Input, paclet:ref/Input])[prompt,init]
in a notebook front end uses init as the initial contents of the input field.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[Input, paclet:ref/Input]) returns the expression it reads.

The operation of (RefLink[Input, paclet:ref/Input]) may vary from one computer system to another. When a Wolfram System front end is used, (RefLink[Input, paclet:ref/Input]) typically works through a dialog box.

When no front end is used, (RefLink[Input, paclet:ref/Input]) reads from standard input.

If the standard input is a file, then (RefLink[Input, paclet:ref/Input]) returns (RefLink[EndOfFile, paclet:ref/EndOfFile]) if you try to read past the end of the file.

On systems with textual input, (RefLink[Input, paclet:ref/Input])[] uses ? as a prompt.

When (RefLink[Input, paclet:ref/Input]) is evaluated, the Wolfram System stops until the input has been read.

With a notebook front end, (RefLink[Input, paclet:ref/Input]) by default puts up a dialog window with a standard appearance.

The prompt given can be text, graphics or any expression.

(RefLink[Input, paclet:ref/Input]) takes notebook options. The default settings include (RefLink[WindowFloating, paclet:ref/WindowFloating])->(RefLink[False, paclet:ref/False]), (RefLink[WindowSize, paclet:ref/WindowSize])->(RefLink[All, paclet:ref/All]) and (RefLink[WindowTitle, paclet:ref/WindowTitle])->(RefLink[None, paclet:ref/None]).

(RefLink[Input, paclet:ref/Input]) by default puts up a dialog in the middle of the main display screen. Explicit settings for (RefLink[WindowMargins, paclet:ref/WindowMargins]) override this.

The options for (RefLink[InputField, paclet:ref/InputField]) can be given directly as options to (RefLink[Input, paclet:ref/Input]) to control the properties of its input field.

(RefLink[Input, paclet:ref/Input])[prompt] is equivalent to (RefLink[Input, paclet:ref/Input])[prompt,""].

OpenersPrimaryExamplesSection(Spacer1)Examples  (2)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Get an input expression and square it:

Input[]^2

Request input of a function to plot:

Plot[Evaluate[Input["Please input a function of x to plot on the unit interval"]],{x,0,1}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[InputString, paclet:ref/InputString])  ▪  (RefLink[Ask, paclet:ref/Ask])  ▪  (RefLink[InputField, paclet:ref/InputField])  ▪  (RefLink[Import, paclet:ref/Import])  ▪  (RefLink[Read, paclet:ref/Read])  ▪  (RefLink[Get, paclet:ref/Get])  ▪  (RefLink[Dialog, paclet:ref/Dialog])  ▪  (RefLink[Button, paclet:ref/Button])  ▪  (RefLink[ChoiceDialog, paclet:ref/ChoiceDialog])  ▪  (RefLink[FormFunction, paclet:ref/FormFunction])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Requesting Input, paclet:tutorial/RequestingInput])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Custom Interface Construction, paclet:guide/CustomInterfaceConstruction])}, {▪(RefLinkPlain[Basic Input & Output in Programs, paclet:guide/BasicInputAndOutputInPrograms])}, {▪(RefLinkPlain[Dialog Boxes, paclet:guide/DialogBoxes])}, {▪(RefLinkPlain[Setting Up User Interactions, paclet:guide/SettingUpUserInteractions])}, {▪(RefLinkPlain[Procedural Programming, paclet:guide/ProceduralProgramming])}})}})