INPUT* Enter the result of an expression into a variable ------------------------------------------------------------------------------ Syntax INPUT [<expPrompt>] TO <idVar> Arguments <expPrompt> is an optional prompt displayed before the input area. The prompt can be an expression of any data type. TO <idVar> specifies the name of the variable to be assigned the evaluation result. If <idVar> is not visible or does not exist, a private variable is created and assigned the result. Description INPUT is a console command and wait state that takes entry from the keyboard in the form of a valid expression of up to 255 characters and any data type. When invoked, INPUT sends a carriage return/linefeed to the screen, displays the prompt, and begins accepting keyboard input at the first character position following the prompt. Input greater than MAXCOL() wraps to the next line. Pressing Return terminates entry of the expression. The expression is then compiled and evaluated using the macro operator (&), and the result assigned to <idVar>. If the variable is not visible or does not exist, it is created as a private. If no expression is entered, no action is taken. INPUT supports only two special keys: Backspace and Return. Esc is not supported. Backspace deletes the last character typed. Return confirms entry and is the only key that can terminate an INPUT. Examples . In this example INPUT assigns a keyboard entry to an existing local variable: LOCAL exp INPUT "Expression: " TO exp IF exp != NIL ? exp ELSE ? "No expression entered" ENDIF Files Library is CLIPPER.LIB.
Pingback: C5 UI – Basics | Viva Clipper !
Pingback: C5_WAIT | Viva Clipper !
Pingback: Variable Handling | Viva Clipper !
Pingback: C5 User Interface | Viva Clipper !
Pingback: C5 Commands | Viva Clipper !