M[UMPS] Functions - $RE[VERSE]

Introduced in the 1995 ANSI M[UMPS] language standard.

This function returns a translated version of the value passed as a parameter. The translation involved reversing the order of the characters in the input-string.

Reference   Value
$REVERSE(123)   321
$REVERSE("AbCdE")   "EdCbA"
$REVERSE(1000)   "0001"
+$REVERSE(1000)   1
$REVERSE(1000.000)   "0001"
$REVERSE($REVERSE(X))   X

Examples with naked references:

$REVERSE(VALUE)
SET ^ABC(1,2)="reset naked indicator"
; Naked indicator is now ^ABC(1,
SET ^(3,4)=$REVERSE(^(5,6))

; 1. fetch ^(5,6) = ^ABC(1,5,6)
; 2. store ^(3,4) = ^ABC(1,5,3,4)
; Naked indicator is now: ^ABC(1,5,3,


This document is © Ed de Moel, 1995-2005.
It is part of a book by Ed de Moel that is published under the title "M[UMPS] by Example" (ISBN 0-918118-42-5).
Printed copies of the book are no longer available.