Ciao Josiah and Mark
Yeehaw! – <https://en.wikipedia.org/wiki/Yeehaw> Your feedback’s worth in
stones would be enough to build a house! Thank you very much, this will at
least improve my docs by several miles ;–)
Easy things first. Here’s a unidirectional converter for two units in three
lines:
The metric weight of <$edit-text tiddler="$:/temp/british-weight-converter"
field="text" tag="input" size="3"/> ''kg'' is equal to:
<$macrocall $name=rpn a={{$:/temp/british-weight-converter}} b=2.20462
operation=* locale=en-GB/> pounds
<$macrocall $name=rpn a={{$:/temp/british-weight-converter}} b=<<rpn 2.20462
14 />> operation=* decimals=3 locale=en-GB/> stones
Josiah, it would be a great success for me personnally if you would build a
converter for the other direction or even a pony weight estimator based on
this example.
Is your test case pointing to the fact, that instead of fractions of
stones, the calculater should show pounds? That would require some
additional lines of code …
Happy conversions,
Thomas
---
''Important!'' Shortcut macro calls in <<syntax>> are not dynamic and get
updated only through re-rendering e.g. when a tiddler is saved or loaded:
<<rpn {{$:/temp/british-weight-converter}} 2.20462 * locale:en-GB>> pounds
Am Mittwoch, 16. August 2017 17:47:57 UTC+2 schrieb @TiddlyTweeter:
>
> One of the most mutually confusing things between Brits & mainland
> Europeans is many British still weigh themselves in "Stones" and pounds,
> not Kilos.
>
> Can RPN provide a converter back and forth between British Stones and Euro
> Kilos? What would the solution look like?
>
> Here is a test case...
>
> Joe Bloggs, British, weighs 10 Stone, 3.5 Pounds.
>
> What weight is Joe Bloggs in Kilos? ... given ...
>
> 1 Stone = 14 Pounds
> 1 Kilo = 2.20462 Pounds
>
> Love to the pony. Happy weighty calculations :-)
> Josiah
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/93f64d33-63f4-4bf5-84bb-a0b43d47bb34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.