HP Forums
Display numbers in MsgBox with groupings - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Display numbers in MsgBox with groupings (/thread-16629.html)



Display numbers in MsgBox with groupings - photometer - 04-09-2021 06:10 PM

I would like to display the numerical output in MsgBox with digit groupings.

for e.g. when I do
x:= 1000000;
MSGBOX("value of x "+ROUND(x,2));

I would like the output to display 1'000'000 instead of 1000000.


RE: Display numbers in MsgBox with groupings - Didier Lachieze - 04-09-2021 06:30 PM

You can use: MSGBOX("value of x "+STRING(ROUND(x,2),0,-1,1))

See the STRING help for more details.


RE: Display numbers in MsgBox with groupings - photometer - 04-09-2021 06:53 PM

(04-09-2021 06:30 PM)Didier Lachieze Wrote:  You can use: MSGBOX("value of x "+STRING(ROUND(x,2),0,-1,1))

See the STRING help for more details.

Thanks very much. It worked.