input quick ...

Prev Next

Function Names

input quick, input quick ignore case

Description

These two functions prompts a message on the screen (asking for user input) and then expects user input for a single character. The character will be read in immediately without [Enter] to be pressed afterwards. Optioally, the 2nd function parameter may contain a collection of allowed characters. The function input quick ignore case ignore case while checking with the allowed characters and the returned character is in upper case.

Call as: function

Restrictions

Indirect parameter passing is disabled.

Parameter count

1, 2

Parameters

No.TypeDescription
1
input
string Prompt

The prompt will be displayed before input is requested

Opt. 2
input
string Allowed characters

Put all allowed characters into the string. Execution will only continue if the check is OK.

Return value

TypeDescription
string Entered character

Examples

    a[] = input quick ignore case("Enter N/Y/1/0 ", ny10 );
    echo("Entered value is : ", a[],"   The type is : ", type (a[]) );

    a[] = input quick ("Enter äbcdé (lower case only, note the accents): ", äbcdé );
    echo("Entered value is : ", a[],"   The type is : ", type (a[]) );

Output

Try it yourself: Open LIB_Function_input_quick.b4p in B4P_Examples.zip. Decompress before use.

See also

getch
getch ignore case
input
table menu