Ale*_*kov 7 wolfram-mathematica
最近,我发现了一些旧帖子上MathGroup其中无证命令行选项的使用-batchinput和-batchoutput所示:
If test.mma contains the following commands:
a=2+2
b=10!;
a+b
then, running Mathematica in batch mode, only output for the first and
third commands goes to stdout:
# math -batchinput -batchoutput < test.mma
4
3628804
Run Code Online (Sandbox Code Playgroud)
但是当尝试在Windows下重现此行为时,我只在控制台窗口中打印出第一个输出.我究竟做错了什么?
我测试了它并将两个数字作为输出.但是,如果最后一个命令后面没有回车符,那么输出就是你发布的内容!
因此,请检查您是否以回车结束最后一行.
| 归档时间: |
|
| 查看次数: |
1393 次 |
| 最近记录: |