☜ | READ1990 Version of ANSI Standard | ☞ |
R[EAD] postcond SP L readargument
See 2.5.1 for the definition of postcond. See section 1 for the definition of L.
readargument | ::= | │ │ │ │ │ │ |
strlit format lvn [ readcount ] [ timeout ] * lvn [ timeout ] @ expratom V L readargument |
│ │ │ │ │ │ |
See 2.2.5 for the definition of strlit. See 2.5.4 for the definition of format. See 2.2.2.1 for the definition of lvn. See 2.5.6 for the definition of timeout. See 2.2 for the definition of expratom. See section 1 for the definition of V. See section 1 for the definition of L.
readcount | ::= | # intexpr |
See 2.2.4.1 for the definition of intexpr.
The readarguments are executed, one at a time, in left-to-right order.
The top two argument forms cause output operations to the current device; the next two cause input from the current device to the named local variable (see 2.2.2.3 for a description of the value assignment operation). If no timeout is present, execution will be suspended until the input message is terminated, either explicitly or implicitly with a readcount. (See 2.6.18 for a definition of current device.)
If a timeout is present, it is interpreted as a t-second timeout, and execution will be suspended until the input message is terminated, but in any case no longer than t seconds. If t '> 0, t = 0 is used.
When a timeout is present, $T is affected as follows. If the input message has been terminated at or before the time at which execution resumes, $T is set to 1; otherwise, $T is set to 0.
When the form of the argument is *lvn [ timeout ], the input message is by definition one character long, and it is explicitly terminated by the entry of one character, which is not necessarily from the ASCII set. The value given to lvn is an integer; the mapping between the set of input characters and the set of integer values given to lvn may be defined by the implementor in a device-dependent manner. If timeout is present and the timeout expires, lvn is given the value –1.
When the form of the argument is lvn [ timeout ], the input message is a string of arbitrary length which is terminated by an implementor-defined procedure, which may be device-dependent. If timeout is present and the timeout expires, the value given to lvn is the string entered prior to expiration of the timeout; otherwise, the value given to lvn is the entire string.
When the form of the argument is lvn # intexpr [ timeout ], let n be the value of intexpr. It is erroneous if n '> 0. Otherwise, the input message is a string whose length is at most n characters, and which is terminated by an implementor-defined, possibly device-dependent procedure, which may be the receipt of the nth character. If timeout is present and the timeout expires prior to the termination of the input message by either mechanism just described, the value given to lvn is the string entered prior to the expiration of the timeout; otherwise, the value given to lvn is the string just described.
When the form of the argument is strlit, that literal is output to the current device, provided that it accepts output.
When the form of the argument is format, the output actions defined in 2.5.4 are executed.
$X and $Y are affected by Read the same as if the command were Write with the same argument list (except for timeouts) and with each expr value in each writeargument equal, in turn, to the final value of the respective lvn resulting from the Read.
Copyright © Standard Documents; 1977-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.
This page most recently updated on 15-Nov-2023, 14:47:37.
For comments, contact Ed de Moel (demoel@jacquardsystems.com)