\HeaderA{readline}{Read a Line from the Terminal}{readline}
\keyword{utilities}{readline}
\begin{Description}\relax
\code{readline} reads a line from the terminal
\end{Description}
\begin{Usage}
\begin{verbatim}
readline(prompt = "")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{prompt}] the string printed when prompting the user for input.
Should usually end with a space \code{" "}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The prompt string will be truncated to a maximum allowed length,
normally 256 chars (but can be changed in the source code).
\end{Details}
\begin{Value}
A character vector of length one.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{readLines}{readLines}} for reading text lines of connections,
including files.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
fun <- function() {
  ANSWER <- readline("Are you a satisfied R user? ")
  if (substr(ANSWER, 1, 1) == "n")
    cat("This is impossible.  YOU LIED!\n")
  else
    cat("I knew it.\n")
}
fun()
\end{ExampleCode}
\end{Examples}

