You are here: Function Reference > Alphabetical Listing > I > Input

Input

Use this function to create a window with a title and a prompt which asks the user to enter information.

Syntax

Input (Prompt, Title, Length, DefText)

Parameter

Description

Prompt

Enter a text string to assign as the prompt for the field. The default is Text.

Title

Enter a text string to assign as the title of the window. The default is Title.

Length

Enter the maximum input text length. The default is set by Windows.

DefText

Enter a text string to assign as the default input data.

The system returns the input results.

This function creates a window you can use to gather information from a user. The text entered through the window is returned as a string. If no text is assigned, or if the user closes the window without choosing Ok, the returned string will be empty.

Example

Here are some examples:

Function

Result

Explanation

NAME = Input ("Please enter your name:", "Name Entry");

Return(Name)

Produces a window requesting input.

The name of the window is Name Entry. The user sees the prompt Please enter your name: If the user selects Cancel, NAME is an empty string. If the user selects Ok, NAME contains the text entered by the user.

Return(Input( ))

Produces a window requesting input.

This window will not have a title or a prompt. The user is merely presented with an input field into which data should be entered.

Return(Input ( "Confirm this result", , 30, "123.45" ))

Produces a window requesting input.

This window will have the prompt Confirm this result. The input field accepts up to 30 characters and defaults to "123.45". There will be no title.

See also