11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

READREADAccepts input and stores it in a variable.READ:pc readargument,...R:pc readargument,...where readargument isfstringvariable:timeout*variable:timeoutvariable#n:timeoutArgumentspcvariablenstringftimeoutOptional — A postconditional expression.The variable to receive the input data. Can be a local variable, aprocess-private global, or a global. May be unsubscripted orsubscripted.Optional — The number of characters to accept, specified as an integer,or an expression or variable that evaluates to an integer.The preceding# symbol is mandatory.Optional — A string literal that provides a prompt or message for userinput. Enclose in quotation marks.Optional — One or more format control characters. Permitted charactersare !, #, ?, and /.Optional — The number of seconds to wait for the request to succeed,specified as an integer. The preceding colon (:) is mandatory.DescriptionThe READ command accepts input from the current device. The current device is establishedusing the OPEN and USE commands. The $IO special variable contains the device ID ofthe current device. By default, the current device is the user terminal.The READ command suspends program execution until it either receives input from thecurrent device or times out. For this reason, the READ command should not be used in programsexecuted as background (non-interactive) jobs if the current device is the user terminal.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 115

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!