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

$TRANSLATE

1990 Version of ANSI Standard

2.2.7.17 $TRanslate

$TR[ANSLATE] ( expr1 , expr2 )

See 2.3 for the definition of expr.

Let s be the value of expr1, $TR(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 )

See 2.3 for the definition of expr.

Let s be the value of expr1, $TR(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.

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 12-Sep-2014, 13:34:35.

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