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

FOR

1977 Version of ANSI Standard

FOR command

See For for formal definition.

  1. Forsw + 1 Right Arrow Forsw.
    Result Right Arrow A.
    PUT Result onto Stack.
    PUT Window position + 1 on Stack.
  2. Window position (FOR body position) Right Arrow B.
    GET Window position from Stack.
    PUT B on Stack.
  3. Place Result in variable named in A.
    Result Right Arrow A.
  4. Result Right Arrow B.
    PUT B on Stack.
    Take the numeric interpretation of the value in A.
    That is, apply the rules given in Section 3.2.5 of MDC/28 to A.
  5. Result Right Arrow C.
    PUT C on Stack.
  6. Current Window position Right Arrow D.
    RESET FOR body position from Stack and link window to it.
    PUT D on Stack.
  7. Place value of retrieved FOR lvn name into A, value of 1st retrieved loop counter into B.
    A + B Right Arrow A.
    Place the result in A in the FOR variable.
    Link window to FOR body position.
  8. A + B Right Arrow A.
    Place the result in A in the FOR variable.
    Link window to FOR body position.
  9. Place value of retrieved FOR lvn name into A, value of 1st retrieved loop counter into B, value of 2nd retrieved loop counter into C.
  10. GET FOR window position and loop counters (if any) from Stack.
  11. Do action 10.
    GET FOR body position and FOR lvn name from Stack.
    Forsw - 1 Right Arrow Forsw.
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 15-Nov-2023, 19:01:09.

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