INPUT

Description

Prompt the user for input.

Syntax

INPUT parametervariable length message [message]

parametervariable can be one of the following variables:

+PARM1 through +PARM9 (global)
#PARM1 through #PARM9 (local)

For a global parametervariable, each character entered at the command prompt is displayed as an asterisk (*). This is important when entering passwords or other sensitive data. If a local parametervariable already contains a value, this value is displayed.

length is a value between 1 and 72.

message can be a character string or a variable. One or two lines of message text prompt the user to enter a value. This value is then stored in the parametervariable.

Examples

  • Prompt for input of an 8 byte long user ID:

    INPUT #PARM1 8 'Enter your user ID'
  • Prompt for input of an 8 byte long password which will not be displayed:

    INPUT +PARM1 8 'Enter your password'
  • Prompt for input of a value. The length of this value is determined by the the local variable #CNT1. The prompt message is contained in the local variable #PARM2:

    INPUT #PARM1 #CNT1 #PARM2

Procedure File Example

Copyscr.ncp

Variables Returned

None

Usage

Procedure File: Yes
Command Line: No
Key: No
API: No