Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

READ

1984 Version of ANSI Standard

READ command

See Read for formal definition.

  1. Result Right Arrow A.
  2. Zero ("0") Right Arrow B.
  3. If Result < 1, trap execution.
    Otherwise, Result Right Arrow B.
  4. Wait for input from the current device ($IO).
    Proceed either after receiving B characters, if B > 0, or after receipt of EOM (End-of-Message), and place input string into variable named in A.
    $X + $L(A) Right Arrow $X.
  5. Wait for input from the current device.
    Proceed after receipt of one character and place the integer character code into variable in A.
    $X + 1 Right Arrow $X.
  6. Set up a timer of Timeout seconds.
    Check for receipt of EOM, or receipt of B characters, if B > 0, and proceed if received.
    Otherwise, proceed after receipt of EOM, receipt of B characters, if B > 0, or expiration of timer, whichever occurs first.
  7. Set up a timer of Timeout seconds.
    Check for receipt of one character and proceed if received.
    Otherwise, proceed after receipt of one character or expiration of timer, whichever occurs first.
  8. Place input string into variable named in A.
    True Right Arrow Ifswitch ($TEST).
    $X + $L(A) Right Arrow $X.
  9. Place the integer character code of input into variable named in A.
    True Right Arrow Ifswitch ($TEST).
    $X + 1 Right Arrow $X.
  10. Place the input string so far received into variable named in A.
    False Right Arrow Ifswitch ($TEST).
    $X + $L(A) Right Arrow $X.
  11. Place –1 into variable named in A.
    False Right Arrow Ifswitch ($TEST).
  12. Output Result to the current device.
    $X + $L(Result) Right Arrow $X.
Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

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 16-Nov-2023, 10:07:27.

For comments, contact Ed de Moel (demoel@jacquardsystems.com)