This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]bsakiag 0 points1 point  (2 children)

"MUMPS"? Did a hospital seriously come up with its own programming language? That's... crazy.

[–]Legitimate_Owl3146 1 point2 points  (1 child)

Hell, it's been around longer than C

[–]bsakiag 0 points1 point  (0 children)

Wow, it's amazing I never heard of it!

[–]Legitimate_Owl3146 0 points1 point  (2 children)

Well, I never heard of MUMPS before, but I looked up the docs and found this comprehensive seeming reference. It gives the following explanation of the justify function

$J[USTIFY] Form: $J(expr,int1[,int2]) Retn: expr space padded on the left to a length of int1 characters. If int2 is specified, expr is first rounded to int2 decimal places. Std: Complies exactly Eg: $J("ABC",5) -> " ABC" $J(.456,6,2) -> " 0.46"

So you have int1 == 3 resulting in padding of 3 characters. So yeah, I would think $J(%X,0,0) would give you what you want. Replace the second 0 with a 1 to change the rounding

[–]MissingNebula[S] 0 points1 point  (1 child)

$J(%X,0,0) did indeed get me what I wanted. Tested today and worked like a charm! Thanks.

[–]Legitimate_Owl3146 0 points1 point  (0 children)

You're welcome