Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Guide To CA-Clipper - <b>accept*</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ACCEPT*
 Place keyboard input into a memory variable
------------------------------------------------------------------------------
 Syntax

     ACCEPT [<expPrompt>] TO <idVar>

 Arguments

     <expPrompt> is an optional prompt displayed before the input area.
     The prompt can be an expression of any data type.

     <idVar> is the variable that will hold input from the keyboard.  If
     the specified <idVar> does not exist or is not visible, a private
     variable is created.

 Description

     ACCEPT is a console command and wait state that takes input from the
     keyboard and assigns it as a character string to the specified variable.
     When ACCEPT is executed, it first performs a carriage return/linefeed,
     displays the prompt, and then begins taking characters from the keyboard
     at the first character position following the prompt.  You may input up
     to 255 characters.  When input reaches the edge of the screen, as
     defined by MAXCOL(), the cursor moves to the next line.

     ACCEPT supports only two editing 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 ACCEPT.  If Return is
     the only key pressed, ACCEPT assigns a null value ("") to <idVar>.

 Examples

     .  This example uses ACCEPT to get keyboard input from the user:

        LOCAL cVar
        ACCEPT "Enter a value: " TO cVar
        IF cVar == ""
           ? "User pressed Return"
        ELSE
           ? "User input:", cVar
        ENDIF

 Files   Library is CLIPPER.LIB.


See Also: @...GET @...SAY INKEY() INPUT* KEYBOARD WAIT*

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson