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

Exclusive Or Operator

M[UMPS] by Example

Logical operator ‘exclusive or’ (!!)

Approved for inclusion in a future M[UMPS] language standard.

Reference   Value
0!!0   0 (false)
0!!1   1 (true)
1!!0   1 (true)
1!!1   0 (false)
Reference   Value
"5 apples"!!"3 pears"   0 (false)
1!!"3 pears"   0 (false)
"5 apples"!!"trees"   1 (true)
"0.125"!!1   0 (false)
"5 apples"!!0   1 (true)
"apples"!!0   0 (false)

Careful with:

Reference   Value
A>3!!B<6   1 (always true)

(A>3!!B is 0 or 1, both 0 and 1 are <6)
The value of (A>3)!!(B<6) depends on the values of A and B

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.

The information in this page is NOT authoritative and subject to be modified at any moment.
Please consult the appropriate (draft) language standard for an authoritative definition.

Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.

This page most recently updated on 16-Nov-2023, 11:55:17.

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