
system variable holding numeric results from the command line

ChrLie
print 8.314*2000 * ln(0.3)
and almost equally often I want to do another calculation that uses the result of the previous calculation, which currently I need to enter manually.
A variable holding the last numeric result from a command executed on the command line, similar to "ans" in MatLab or "%" in Mathematica would be greatly appreciated.
If you think ahead, you can use your own variable:
Variable res=8.314*2000 * ln(0.3);print res
Now use res in subsequent computations.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
May 23, 2012 at 11:22 am - Permalink
How about a print/C flag that "captures" the output to a variable V_print?
--> print/C 2*3
---- 6
--> print/C v_print*3
--- 18
--> print 5*5
--- 25
--> print v_print*2
--- 36
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
May 23, 2012 at 12:06 pm - Permalink
May 24, 2012 at 04:20 am - Permalink
Oh ... print/V (print to variable) is open!
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
May 24, 2012 at 05:52 am - Permalink
June 12, 2012 at 07:26 am - Permalink