☜ | $TRANSLATEDraft MDC Standard | ☞ |
$TR[ANSLATE] ( expr1 , expr2 )
Let s be the value of expr1, $TRanslate( expr1 , expr2 ) returns an edited form of s in which all characters in s which are found in expr2 are removed.
$TR[ANSLATE] ( expr1 , expr2 , expr3 )
Let s be the value of expr1, $TRanslate( expr1 , expr2 , expr3 ) returns an edited form of s in which all characters in s which are found in expr2 are replaced by the positionally corresponding character in expr3. If a character in s appears more than once in expr2 the first (leftmost) occurrence is used to positionally locate the translation.
Translation is performed once for each character in s. Characters which are in s that are not in expr2 remain unchanged. Characters in expr2 which have no corresponding character in expr3 are deleted from s (this is the case when expr3 is shorter than expr2).
Note: If the value of expr2 is the empty string, no translation is performed and s is returned unchanged.
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 12-Sep-2014, 13:34:35.
For comments, contact Ed de Moel (demoel@jacquardsystems.com)