☜ | $%UPPERDraft MDC Standard | ☞ |
Editor’s note: Recommend to use $QSubscript to find the value of y. The first subscript of ^$Global must be a string that starts with "^", and that character is explicitly removed from the value that is being used. |
UPPER(A,CHARMOD) New lo,up,x,y ; ; The code below was approved in document X11/1998–21 ; Set x=$Get(CHARMOD) Set lo="abcdefghijklmnopqrstuvwxyz" Set up="ABCDEFGHIJKLMNOPQRSTUVWXYZ" If x?1"^"1E.E Do . Set x=$Extract(x,2,$Length(x)) . If x?1"|".E Do . . Set x=$REverse($Extract(x,2,$Length(x))) . . Set y=$REverse($Piece(x,"|",2,$Length(x)+2)) . . Set x=$REverse($Piece(x,"|",1)) . . Set x=$Get(^|y|$GLOBAL(x,"CHARACTER")) . . Quit . Else Set x=$Get(^$Global(x,"CHARACTER")) . Quit If x="" Set x=^$Job($Job,"CHARACTER") Set x=$Get(^$Character(x,"UPPER")) If x="" Quit $TRanslate(A,lo,up) Set @("x="_x_"(A)") Quit x
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 14-Nov-2023, 21:44:51.
For comments, contact Ed de Moel (demoel@jacquardsystems.com)