我想用Mathematica编写命令行脚本,但似乎找不到类似于Argv[i_Integer]
的函数。 (否则,文档太棒了。)
最佳答案
似乎$ScriptCommandLine是您需要的变量,前提是您要使用MathematicaScript编写脚本。如果使用math
或MathKernel -script
,则为$CommandLine。
其他相关讨论:rather old one和MMA toolbag中的一个。
关于wolfram-mathematica - 您如何在Mathematica中访问ARGV?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7972649/