[Ifeffit] Ifeffit "print" command question
Bruce Ravel
bravel at bnl.gov
Fri Dec 31 07:18:56 CST 2010
> I have recently downloaded Ifeffit for Mac OS X from your website. I am
> hoping to be able to use it with EXAFS data as the FEFF6 website led me
> to your application. I am currently working through the tutorial.
> However, every time I try to use the print command to make a literal
> string statement, all I get is 0.0000 back. Example:
>
>
>
> print " the square root of ", number, " is ", sqrt(number)
>
> 0.0 99.0000000 0.0000000 9.94987437
>
> print "Hi mom"
>
> 0.000000000
>
> Any thoughts?
My thought is RTM.
http://cars9.uchicago.edu/~ifeffit/refman/node96.html
Ifeffit isn't really a proper language with a REPL in the sense that, say,
bash or python or powershell is. Ifeffit is a pretty singular of purpose
object -- it is a tool for processing and analyzing certain kinds of data. It
just does that.
As the page from the manual explains, "print" is a way of evaluating
expression. "Hi mom" evaluates to 0. So does " is ". So does " the square
root of ".
In the problem area of Ifeffit, "print" is an expression evaluator, not the
parser/evaluator of a REPL.
Ifeffit> set a=2
Ifeffit> print a
2.00000000
Ifeffit> print sqrt(a)+atan(a**2)
2.74003123
Ifeffit> print "sqrt(a) + atan(a**2)"
2.74003123
HTH,
B
--
Bruce Ravel ------------------------------------ bravel at bnl.gov
National Institute of Standards and Technology
Synchrotron Methods Group at NSLS --- Beamlines U7A, X24A, X23A2
Building 535A
Upton NY, 11973
My homepage: http://xafs.org/BruceRavel
EXAFS software: http://cars9.uchicago.edu/~ravel/software/exafs/
More information about the Ifeffit
mailing list