-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restrict formatting of nested prefixes for UCUM #108
Comments
Also see some comments in #107 |
@magnonasc @garretwilson any thoughts on this? |
It sounds reasonable, my thought of that is that it should mix the prefix into a single one if it's within its range, and just multiply if not, or, as presented by you, if any prefix is already used like I don't remember if there's anything about it in specific in the docs, but if not, you should choose one, you I think you already did, and it's a good choice.
So I think it means that |
Actually parentheses (‘(’ and ‘)’) are not the square brackets which have a different meaning, alltogether there are at least 3 types of brackets in the UCUM specification. Whether |
But the parenthesis in PRINT becomes square brackets in the other types, doesn't it? Or is it about other parenthesis? |
No it's the round one "(" or ")" that can surround certain operations, e.g. |
Currently
UCUMFormat
works as designed for prefixes likeMICRO
:However when "nested" operations are applied behind such prefix, you get results like:
The UCUM spec under http://unitsofmeasure.org/ucum.html#section-Semantics
§10 nested terms
statesSo combining something like
.multiply(10)
withMICRO(LITER)
whether in front or behind it seems illegitimate for UCUM.Since it would not be nice to throw an exception in such case, a reasonable alternate representation should be found, e.g.
uL*10
instead ofdauL
.The text was updated successfully, but these errors were encountered: