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

IF

1984 Version of ANSI Standard

3.6.9 IF

I[F]

[ Space ]
Space L ifargument


    ifargument::=

tvexpr
@ expratom V L ifargument


In its argumentless form, IF is the inverse of ELSE. That is, if the value of $T is 0, the remainder of the line to the right of the IF is not executed. If the value of $T is 1, execution continues normally at the next command.

If exactly one argument is present, the value of tvexpr is placed into $T; then the function described above is performed.

IF with n arguments is equivalent in execution to n IFs, each with one argument, with the respective arguments in the same order. This may be thought of as an implied "and" of the conditions expressed by the arguments.

See also the transition diagram for If.

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 14-Nov-2023, 21:10:36.

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