parser ? [message #10051] |
Mon, 06 October 1997 00:00 |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
Hi,
now that I have written this little widget "calculator" which works
really fine and computes almost anything I want (which is not much
more than the occasional +,-,*,/ or logarithm, I must admit), I am
slowly getting sick of clicking my way through a bit more nested
formulas, especially when I have to repeat the same calculation with
different data sets. I already designed my calculator to return a
formatted string describing the arithmetic operations that it performed,
but now I am looking for a way to read these strings back in and do
calculations as a batch job. Is there any way to use the build in parser
of IDL ? Or has anyone written something like this (which is well enough
documented so that I could adapt it to my needs) ? I have also briefly
thought about writing out the equations in a file tmp_func.pro or
something alike, and then use EXECUTE (or whatever would serve the
purpose) in order to compile and call the procedure/function that has
been automatically produced.
Any ideas appreciated,
Thanks,
Martin.
------------------------------------------------------------ ------------Dr.
Martin Schultz
Department for Earth&Planetary Sciences, Harvard University
186 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA
phone: (617)-496-8318
fax : (617)-495-9837
Please indicate name and room (186 Pierce) when sending a fax
mailto:mgs@io.harvard.edu
IDL-homepage: http://www-as.harvard.edu/people/staff/mgs/idl/
------------------------------------------------------------ ------------
|
|
|