[Solved] Displaying B for billion, µ for micro
The What's new in Analytica 6.0? page says that you can now configure the suffix number format to print B for billion and/or µ for millionth (instead of G and u). But you have do use typescript to do it. Can you show me the typescript command to set this? And could somebody put together a library with a UI for doing this?
On the wiki page for NumberFormat, with Release=6.0 selected at the top, it says that item 18 is «GigaOrMuSuffixChars» and specifies with to use using the characters B, G, u or µ. So to use µ for micro, from the Typescript window I did this:
Untitled>sys_defaultNumberFmt
Sys_DefaultNumberFmt = '2,D,4,2,0,0,4,0,$,0,"ABBREV",0'Sys_DefaultNumberFmt>Sys_DefaultNumberFmt : 2,D,4,2,0,0,4,0,$,0,"ABBREV",0,,,,,,µ
I counted the commas to make sure I was setting item 18. On my keyboard (an international layout) I was able to type the µ by holding the right-Alt key and pressing m. I'm also able to type it by holding down either Alt key as I type +B5. These input method may vary depending on which keyboard you use.
I tested on the sample result view for
if bernoulli(0.5) then Uniform(1µ,1m) else Uniform(1B,1T)
To set both B for billions and µ for millionths, the typescript would be:
Sys_DefaultNumberFmt : 2,D,4,2,0,0,4,0,$,0,"ABBREV",0,,,,,,Bµ
Here is a library with a GUI for configuring the suffix characters to use.
To use, select File / Add Module... (or Add Library...) and embed. Then enter the library and select which suffix characters you prefer from the choices.
Currently viewing this topic 1 guest.
- 4 Forums
- 87 Topics
- 283 Posts
- 1 Online
- 1,874 Members