Chemical calculator: Difference between revisions
m
→{{header|Wren}}: Minor tidy
imported>Friman No edit summary |
m (→{{header|Wren}}: Minor tidy) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 4,655:
{{libheader|Wren-fmt}}
{{libheader|Wren-str}}
<syntaxhighlight lang="
import "./str" for Char, Str
var atomicMass = {
Line 4,829:
for (molecule in molecules) {
var mass = evaluate.call(replaceParens.call(molecule))
}</syntaxhighlight>
Line 4,846:
Uue -> 315.000
</pre>
=={{header|zkl}}==
Really bad error checking
Line 4,920 ⟶ 4,921:
</pre>
=={{header|X-script}}==
<syntaxhighlight lang="zkl">
<var $weighttab[],
-H:1.008|He:4.002602|Li:6.94|Be:9.0121831|B:10.81|C:12.011|N:14.007|O:15.999|F:18.998403163|
Line 5,036 ⟶ 5,038:
<assert 386.664,C27H46O>
<assert 315 ,Uue>
{{out}}
Weight of H = 1.008.<br>
Weight of H2 = 2.016.<br>
Weight of H2O = 18.015.<br>
Weight of H2O2 = 34.014.<br>
Weight of (HO)2 = 34.014.<br>
Weight of Na2SO4 = 142.036.<br>
Weight of C6H12 = 84.162.<br>
Weight of COOH(C(CH3)2)3CH3 = 186.295.<br>
Weight of C6H4O2(OH)4 = 176.124.<br>
Weight of C27H46O = 386.664.<br>
Weight of Uue = 315.000.
|