【发布时间】:2018-03-03 14:00:40
【问题描述】:
我正在尝试从该网站运行一个简单的 IDL 程序:https://www.colorado.edu/physics/phys4810/phys4810_sp08/tutorial.htm
这是代码:
PRO example
a=5 ;sets a to 5
b=13.5 ;and b to 13.5
c=a+b ;adds a and b and puts the result in c
d=a*sin(b) ;sets d to the product of a and Sine(b)
e=b*exp(a) ;sets e to the product of b and Exp(a)
print,a,b,c,d,e ;prints the results
END
输出应该是:
5 13.5000 18.5000 4.01892 2003.58
但是我得到了这个:
IDL> .run example.pro
% Compiled module: EXAMPLE.
IDL>
我从上面链接的网站上完全复制了代码,并完全按照上面所示运行它。我想知道我哪里出错了。此外,我正在使用 mac OS 10.13.3,以防万一。感谢您的帮助。
【问题讨论】: