PROMPT Statement

Selects the character used to prompt the user for input.

Syntax

PROMPT prompt-char

Syntax Elements

prompt-char is a character to be used as the input prompt character.

If prompt-char has more than one character, only the first character is used.

prompt-char can be a literal (enclosed in quotes) or a variable.

Comments

Once a PROMPT statement has been executed, it remains in effect until another PROMPT statement is issued.

If no PROMPT statement has been issued, the INPUT statement uses a question mark (?) as the default prompt character.

Examples

PROMPT "@"

Specifies that the character @ will be used as the prompt character for subsequent INPUT statements.

PROMPT 5*5

Selects the digit 2 as the prompt character because 5*5=25 and only the first character is used.

PROMPT A

Specifies that the current value of A will be used as the prompt character.