☜ | String RelationsDraft MDC Standard | ☞ |
The relations =, [, ], ]=, ]], and ]]= do not imply any numeric interpretation of either of their operands.
The relation = tests string identity. If the operands are not known to be numeric and numeric equality is to be tested, the programmer may apply an appropriate unary operator to the non-numeric operands. If both operands are known to be in numeric form (as would be the case, for example, if they resulted from the application of any operator except _), application of a unary operator is not necessary. The uniqueness of the numeric representation guarantees the equivalence of string and numeric equality when both operands are numeric. Note, however, that the division operator / may produce inexact results, with the usual problems attendant to inexact arithmetic.
The relation [ is called contains. A [ B is true if and only if B is a substring of A; that is, A [ B has the same value as ''$Find(A,B). Note that the empty string is a substring of every string.
The relation ] is called follows. A ] B is true if and only if A follows B in the sequence, defined here. A follows B if and only if any of the following is true.
The relation ]= is called follows or equals. A]=B is true if and only if A follows B as defined above or A is identical to B.
The relation ]] is called sorts after. A]]B is true if and only if A follows B in the subscript ordering sequence defined by the single argument $Order function as if that $Order refers to an lvn.
The relation ]]= is called sorts after or equals. A]]=B is true if and only if A sorts after B as defined above or A is identical to B.
The relation == tests object reference identity. A == B is true if and only if all of the following conditions are met:
In the context of the == operator, values are never coerced to any specific data type or interpretation.
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.
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 15-Nov-2023, 13:18:01.
For comments, contact Ed de Moel (demoel@jacquardsystems.com)