Chemical calculator: Difference between revisions

Content added Content deleted
No edit summary
Line 1,126: Line 1,126:
''Draft''
''Draft''


==== Program ====
====Program====


<syntaxhighlight lang="lisp">;; 22.11.20 Draft
<syntaxhighlight lang="lisp">;; 22.11.20 Draft
Line 1,161: Line 1,161:
(return (first stack)))))</syntaxhighlight>
(return (first stack)))))</syntaxhighlight>


==== Table ====
====Table====


<syntaxhighlight lang="lisp">(defconstant +tokens+ '(("Ac" A 227.000) ("Ag" A 107.868) ("Al" A 026.982)
<syntaxhighlight lang="lisp">(defconstant +tokens+ '(("Ac" A 227.000) ("Ag" A 107.868) ("Al" A 026.982)
Line 1,201: Line 1,201:
(")" R 0)))</syntaxhighlight>
(")" R 0)))</syntaxhighlight>


==== Tests ====
====Tests====


<pre>(and (equal (molar-mass "H") 1.008)
<pre>(and (equal (molar-mass "H") 1.008)
Line 1,219: Line 1,219:
<pre>T</pre>
<pre>T</pre>


==== Step by step ====
====Step by step====


<pre>COOH(C(CH3)2)3CH3
<pre>COOH(C(CH3)2)3CH3
Line 1,442: Line 1,442:
C27H46O -> 386.664
C27H46O -> 386.664
Uue -> 315.000</pre>
Uue -> 315.000</pre>

=={{header|Delphi}}==
=={{header|Delphi}}==
{{trans|Go}}
{{trans|Go}}