Accepts input and stores it in a variable.
||Either the name of a variable used to receive the data input, or a quoted string specifying the data.
statement inputs a literal data value. It can interactively receives a data value from the user into a variable, or it can input a specified quoted string.
with a variable cannot be used in a program running in background. Program execution is paused until the user indicates the end of data input and submits the data value by pressing the Return key.
The ObjectScript READ
command provides more extensive support for interactive user input.
The following example illustrates the interactive use of the Input
Println "Type your name, then press Return"
Println "Thanks ",namevar
The following example illustrates the background use of the Input
Println "Here's the name"
Println "Thanks "
© 1997-2019 InterSystems Corporation, Cambridge, MA