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*
Pingback: C5 UI – Basics | Viva Clipper !
Pingback: C5_WAIT | Viva Clipper !
Pingback: Variable Handling | Viva Clipper !
Pingback: C5_INPUT | Viva Clipper !
Pingback: C5 User Interface | Viva Clipper !
Pingback: C5 Commands | Viva Clipper !