\codebegin{0}{input\_obj = {\bf cluster} is create, add\_char, delete\_char, get\_buffer, set\_buffer,}\codeend
\codebegin{24}{clear, redraw, moveto\_end}\codeend
\comment{}{4}{Overview:}{ An {\em input\_obj} represents the input line of a screen
where input from the keyboard appears. It is mutable.
}
\codebegin{4}{create = {\bf proc} (screen: ss, r, c, w: int, p: string) {\bf returns} (input\_obj)}\codeend
\codebegin{13}{{\bf signals}(bad\_param(string))}\codeend
\comment{}{8}{modifies:}{ screen
}
\comment{}{8}{effects:}{ Creates an input object and prints the prompt on the 
screen. Signals bad\_param, and gives which parameter 
is bad, if the row or column is not valid for the screen
given, or if the width plus the length of the prompt 
extends outside the bounds of the screen given the 
starting column col.
}
\codebegin{4}{add\_char = {\bf proc} (io: input\_obj, c: char) {\bf signals}(too\_long)}\codeend
\comment{}{8}{modifies:}{ io
}
\comment{}{8}{effects:}{ Adds a character to the end of the input object; puts
it in the buffer as well as displays it on the screen.
}
\codebegin{4}{delete\_char = {\bf proc} (io: input\_obj) {\bf signals} (no\_char)}\codeend
\comment{}{8}{modifies:}{ io
}
\comment{}{8}{effects:}{ Deletes the last character in the buffer and on the
input line of the screen.
}
\codebegin{4}{get\_buffer = {\bf proc} (io: input\_obj) {\bf returns} (ac)}\codeend
\comment{}{8}{effects:}{ Returns an array of characters representing what is
currently on the input line, excluding prompt.
}
\codebegin{4}{set\_buffer = {\bf proc} (io: input\_obj, a: ac) }\codeend
\comment{}{8}{modifies:}{ io
}
\comment{}{8}{effects:}{ Set the buffer io to be the new array a.
}
\codebegin{4}{clear = {\bf proc} (io: input\_obj)}\codeend
\comment{}{8}{modifies:}{ io
}
\comment{}{8}{effects:}{ Clears the input line of the screen and the buffer.
}
\codebegin{4}{redraw = {\bf proc} (io: input\_obj)}\codeend
\comment{}{8}{modifies:}{ io
}
\comment{}{8}{effects:}{ Clears the input line and then prints the prompt and the
contents of the buffer back onto the screen.
}
\codebegin{4}{moveto\_end = {\bf proc} (io: input\_obj) }\codeend
\comment{}{8}{modifies:}{ io
}
\comment{}{8}{effects:}{ Moves the cursor on the screen to the end of the 
current contents of the input buffer of io.
}

