我有两个文件,如: program.lol text.txt
然后,我想运行LOLCODE代码,将文本文件的名称作为参数传递,语法如下:
./interpreter program.lol text.txt我想打印文本文件的内容,但我不知道如何传递和读取参数。
有什么想法吗?
发布于 2016-02-13 00:12:22
不支持命令行参数in the spec for v1.2.。即使在proposed future spec for v1.3中也不是。因此,这是不可能的。最好的方法是传入文件名作为输入,然后使用GIMMEH获取文件名。
https://stackoverflow.com/questions/33392967
复制相似问题