inputnoecho

Description

The inputnoecho() function prompts the user for a single line of input. There is no default prompt. It ignores excess input if the user supplies more than one line of input.

The inputnoecho() function works like the input() function, except that the input that is typed by the user is not shown on the terminal. This function is useful when prompting the user for a password or other types of confidential information.

Syntax

result = inputnoecho (prompt);

Arguments

prompt Required. Character string containing the prompt displayed to the user.

Return Values

result is a character string that contains the single line of input that is typed by the user.

result = inputnoecho ("Please enter your first and last name:");

In this example, the prompt Please enter you first and last name: is displayed to the user. The resulting input is stored in result.

For more information, see input.