Caché MultiValue Basic Reference
DATA
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Class Reference   
Search:    

Provides user input data.
Synopsis
DATA exp [,exp2][. . .]
Arguments
exp An expression to use as user input data. It can be a literal or a defined variable. You can specify a comma-separated list of multiple expressions.
Description
The DATA statement defines one or more input values on an input stack for future use. A DATA value is taken from the input stack by the next INPUT statement, rather than pausing program execution for user input.
You can specify a comma-separated list of DATA values; these are used successively by multiple invocations of the INPUT statement.
A DATA value of the empty string (DATA "") is treated as an actual data value: If the optional length parameter of a subsequent INPUT statement is set to -1, INPUT sets variable to 1 (indicating that there is input available). If the INPUT statement has a THEN clause, INPUT executes the statements associated with THEN clause as if the user had entered data from the keyboard.
You can use CLEARDATA to flush all remaining data stored by a DATA statement.
You cannot use DATA to supply a character to the KEYIN function.
See Also