【问题标题】:Using IDL in the command line on mac在 mac 的命令行中使用 IDL
【发布时间】: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,以防万一。感谢您的帮助。

【问题讨论】:

    标签: idl-programming-language


    【解决方案1】:

    .run 用于主级程序,您正在尝试调用一个过程。你应该能够做到:

    IDL> example
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-10-09
      • 2021-09-09
      • 1970-01-01
      • 2015-12-21
      • 2018-04-09
      • 2015-10-13
      • 2011-02-19
      相关资源
      最近更新 更多