04-21-2026 04:24 AM
@paul_a_cardinale wrote:
@PhillipDBrooks wrote:
If units are used, you can use the following format for an SI formatted value
%_3{V}p
That moves the space, but doesn't eliminate it. Also, it only works if the physical quantity is voltage; doesn't work for other physical quantities.
Besides Voltage, the {} also works for Gauss and Tesla
I don't have to use it often, but when I do, I appreciate the built-in Unit Conversion e.g. CGS to SI System
04-21-2026 07:05 AM
@paul_a_cardinale wrote:
@Yamaeda wrote:
Unit agnoistic with space moved, but not suppressed.
Not unit agnostic. It assumes that the unit is a single character (often it is not).
Right! I didn't think about that, you have to cut at space instead.
04-23-2026 05:11 AM
It is not exactly what you mean (it does not use the unit of the numerical), but here is a univeral number formatter with units included. I use it to display all my numerical values. It also gives the number and unit separately. The caller then has an indicator for both the value and unit. This allows you to nicely align multiple indicators vertically.
04-23-2026 10:42 AM
@paul_a_cardinale wrote:
@Yamaeda wrote:
Unit agnoistic with space moved, but not suppressed.
Not unit agnostic. It assumes that the unit is a single character (often it is not).
Attempt 2 🙂
04-23-2026 12:06 PM
@Yamaeda wrote:
[...]Attempt 2 🙂
[...]
never surrender ; )
04-24-2026 12:57 AM
@Yamaeda wrote:
Attempt 2 🙂
Good attempt, but unfortunately no space between numeral and unit appear, usually it should be "456 kPa", instead of "456kPa" (from Typography point of view).
04-24-2026 01:12 AM
Fun exercise in string manipulation. Here is a version that works for numerical values with a unit.
Kudos to @Yamaeda for getting the unit using the format string function. I didn't know it kept the unit in the output string!
04-24-2026 03:39 AM
@Andrey_Dmitriev wrote:Good attempt, but unfortunately no space between numeral and unit appear, usually it should be "456 kPa", instead of "456kPa" (from Typography point of view).
When i went to school we often wrote it without space. It seems it's standardized to a space nowadays.
04-24-2026 04:03 AM - edited 04-24-2026 04:04 AM
Hi Yamaeda,
@Yamaeda wrote:
When i went to school we often wrote it without space. It seems it's standardized to a space nowadays.
"Nowadays" is atleast 30 years old (when I wrote my diploma thesis)!

That's the German regulation, I already linked to the NIST rules in message #2.
04-24-2026 04:11 AM
Then it turns to this: