Enter the result of an expression into a variable

     INPUT [<expPrompt>] TO <idVar>


     <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.


     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

     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.


     .  In this example INPUT assigns a keyboard entry to an existing
        local variable:

        LOCAL exp
        INPUT "Expression: " TO exp
        IF exp != NIL
           ? exp
           ? "No expression entered"

 Files   Library is CLIPPER.LIB.

See Also: ACCEPT*


5 responses to “C5_INPUT

  1. Pingback: C5 UI – Basics | Viva Clipper !

  2. Pingback: C5_WAIT | Viva Clipper !

  3. Pingback: Variable Handling | Viva Clipper !

  4. Pingback: C5 User Interface | Viva Clipper !

  5. Pingback: C5 Commands | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.