Bypass navigation menu
RGB Classic Games
Keeping the classics alive
Currently hosting 566 great games!
Return to Chapter 2

GetInput(Prompt, String)

Allows input of string variables while in the color graphics mode.

It provides many of the editing capabilities of BASIC's INPUT function. The keys that are listed show what editing functions are currently handled:

BACKSPACE - Backspaces the cursor, erasing the first character to the left. All characters to right move left one position.

ENTER - Exits the 'GetInput' function and transfers the entered data to string variable.

ESC - Erases the entire line and moves the cursor to first keying position.

HOME - Moves the cursor to the first keying position.

LEFT ARROW - Moves the cursor left one space.

RIGHT ARROW - Moves the cursor right one space

END - Moves the end of the line.

INSERT - Toggles insert mode on/off. If insert mode is on then characters are added at current cursor position. If insert mode is off then characters are overwritten at the current cursor position.

DELETE - Deletes the character at the current cursor position and moves all remaining characters to the left one position.

The graphics cursor is turned on for this function. Its previous status is restored when the function is done.

Parameters

Prompt - Prompt to display for input
String - String variable to hold input entered

Examples

BASIC

CALL GetInput("Enter Your Name ", A$)

PASCAL

GetInput('Enter Your Name ', A);