INPUT
Syntax
![]()
Command
Mandatory parameter Optional parameter Mandatory keyword Optional keyword |
<Variable> := INPUT ([<Message String>[, <Maximum Wait Time>]])
Description
Gets data from the keyboard and stores it in a variable. If the data is invalid for the edit type of the variable, RESOK is set to "False".
Diagram
Returned value type
String
Parameters
Parameter | Description |
<Variable> | Variable in which the input is stored. |
<Message string> | Literal value to be shown to the end user. |
<Maximum Wait Time> | Maximum wait time in seconds. |
Remarks
This instruction can only be used inside reports. |
The return value of the Input command can be directly assigned to a numeric or signed. When the number of digits before the decimal exceeds the format of the numeric or signed ResOk will be set to False. |
When a maximum wait time is given, the command will wait for the input during the given seconds. When the input is not answered in the given time the command will return with RESOK set to "False". |
Example
sa-filename := input ('Please give a filename or STOP')
if suc(sa-filename) = 'STOP'
break
endif
if suc(sa-filename) = 'STOP'
break
endif