There's a typo in the MUMPS Documentation reference.
Func: $O[RDER]
Form: $O(subscripted variable[,int])
where int must be 1 or -1
Retn: The next (int = 1 or not specified) or previous (int = -1) element
at the specified level. The empty string may be specified as a seed.
The collating sequence used is the MUMPS collating sequence.
Std: Complies exactly using the MUMPS collating sequence
Eg: K A S A(1,2)="",A(1,4)="" then
$O(A(1,"")) -> 2
$O(A(1,""),1) -> 4
$O(A(1,2)) -> 4
$O(A(1,4),-1) -> 2
The second example says that it evaluates to 4, but it actually should evaluate to 2. Should be a quick fix.
Alternatively, the [int] parameter is meant to be a -1, which WOULD yield 4.
I'm sure the documentation in view was intended to be a -1.
This repository (MUMPS V1) is no longer maintained by Ray Newman; maintenance ended in 2018. On June 17, 2020, Ray Newman handed stewardship of the MUMPS V1 codebase to me, explicitly authorizing relicensing and renaming of future versions. His final release (V1.71) remains available here and also on my GitLab account. Development continues in Reference Standard M (RSM), which can be found at https://gitlab.com/Reference-Standard-M/rsm .
For help, updates, or to report issues, please use the RSM project (after updating to the lastest RSM release) - issues here may not get a response.
Last edit: David Wicksell 2026-01-07