unit conversion using the API #733
Answered
by
hanna-kn
theedge456
asked this question in
Q&A
-
Hello,
|
Beta Was this translation helpful? Give feedback.
Answered by
hanna-kn
Dec 20, 2024
Replies: 1 comment 4 replies
-
Remove |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prefixes has not been loaded:
c.loadGlobalPrefixes();
loadGlobalDefinitions()
is however preferable (a few units depend on variables).c.convert("10m", "mm")
should bec.convert(c.parse("10m"), "mm")
No (not that I know of, except the code of the user interfaces). I generally recommend use of
Calculator::calculateAndPrint()
for simple input and output.