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

FOR

1984 Version of ANSI Standard

FOR command

See For for formal definition.

  1. Forsw + 1 Right Arrow Forsw.
    Result Right Arrow B.
    PUT Result (FOR lvn name) eol onto Stack.
    PUT Window position + 1 on Stack.
  2. Window position (FOR body position) Right Arrow A.
    GET Window position from Stack.
    PUT A on Stack.
  3. 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 Part I to A.
  5. Result Right Arrow C.
    PUT C on Stack.
  6. Place the result in A in the FOR lvn name.
  7. Current Window position Right Arrow D.
    RESET FOR body position from Stack and link window to it.
    PUT D on Stack.
  8. 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 lvn name.
    Link window to FOR body position.
  9. A + B Right Arrow A.
    Place the result in A in the FOR lvn name.
    Link window to FOR body position.
  10. 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.
  11. GET FOR window position and loop counters (if any) from Stack.
  12. Do action 11.
    GET FOR body position and FOR lvn name from Stack.
    Forsw - 1 Right Arrow Forsw.
    Set semantic action flag Linact False.
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)