system variable holding numeric results from the command line

I quite often use Igor's command line as a calculator by executing something like this

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.

I see your point. I don't know if Igor will ever have such a thing.

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
johnweeks wrote:
I see your point. I don't know if Igor will ever have such a thing.


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
Unfortunately, Print/C is already reserved for printing numeric expressions as complex. /S, although obsolete, is also reserved.
s.r.chinn wrote:
Unfortunately, Print/C is already reserved for printing numeric expressions as complex. /S, although obsolete, is also reserved.


Oh ... print/V (print to variable) is open!

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville