read_string ( : : InString, Length : OutString )

Reads a string in a graphics window.

read_string reads a string with a predetermined maximum size (Length) from the keyboard in the current input window (= output window). The string is read from the current position of the text cursor using the current font. The maximum size has to be small enough to keep the string within the right window boundary. A default string which can be edited or simply accepted by the user may be provided. After text input the text cursor is positioned at the end of the edited string. Commands for editing: RETURN finish input BACKSPACE delete the character on the left side of the cursor and move the cursor to this position. \begin{description} \item[RETURN] finish input \item[BACKSPACE] delete the character on the left side of the cursor and move the cursor to this position. \end{description}


Attention

The current window has to be a text window.


Parameters

InString (input_control)
string -> string
default string (visible before input).
Default value: ''

Length (input_control)
integer -> integer
maximum number of characters.
Default value: 32
Restriction: Length > 0

OutString (output_control)
string -> string
read string.


Result

read_string returns TRUE, if a text window is activated and a string of maximal length fits within the right window boundary. Otherwise an exception is raised.


Possible Predecessors

set_window, open_textwindow, search_font, set_font


Alternatives

read_char, fread_string, fread_char


See also

set_tposition, new_line, set_window, open_textwindow, set_font, set_color



Copyright © 1996-1997 MVTec Software GmbH