xHarbour Reference Documentation > Command Reference xHarbour Developers Network  

INPUT

Assigns the result of an input expression to a variable.

Syntax

INPUT [<xMessage>] TO <cVarName>

Arguments

<xMessage>
This is an optional expression of data type C, D, L or N. The value of <xMessage> is displayed before the user can input an expression.
<cVarName>
This is a character string holding the name of the variable to assign the result of user input to. It must be of PRIVATE or PUBLIC scope. If <cVarName> does not exist, a PRIVATE variable is created.

Description

The INPUT command exists for compatibility reasons only. It is a very basic text-mode command that allows a user for entering an expression. The input character string is compiled with the macro operator (&) and the result of the compiled expression is assigned to a single memory variable.

During user input only the Return key is recognized as termination key. The Escape key does not terminate the INPUT command.

Note:  if an invalid expression is entered, a runtime error is generated.

Info

See also:ACCEPT
Category: Input commands
Source:rtl\input.prg
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe