Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
读取终端参数并在lisp中传递函数?_Lisp_Common Lisp_Clisp - Fatal编程技术网

读取终端参数并在lisp中传递函数?

读取终端参数并在lisp中传递函数?,lisp,common-lisp,clisp,Lisp,Common Lisp,Clisp,我在ubuntu中编译这个文件 clisp example.lisp 我想直接从终端获取filename参数,例如>>clisp example.lisp filename 但是这个命令不起作用。如何从Clisp中的terminal获取GPPInterpter中的文件名参数,程序参数在变量EXT:*ARGS*中给出 在加载之前,变量EXT:ARGS被绑定到一个字符串列表,表示给定给Lisp脚本的参数(即,$1 in/bin/sh变为(第一个EXT:ARGS)等) 所以我认为您应该使用(第二个E

我在ubuntu中编译这个文件

clisp example.lisp

我想直接从终端获取filename参数,例如>>clisp example.lisp filename


但是这个命令不起作用。如何从Clisp中的terminal

获取GPPInterpter中的文件名参数,程序参数在变量
EXT:*ARGS*
中给出

在加载之前,变量EXT:ARGS被绑定到一个字符串列表,表示给定给Lisp脚本的参数(即,$1 in/bin/sh变为(第一个EXT:ARGS)等)


所以我认为您应该使用
(第二个EXT:*ARGS*)

fileContent
是一个未定义的变量。这是Lisp中的一个错误。
(defun gppinterpreter (filename)
    (setq fileContent (read-a-file filename))
    (write filecontent)
)
(gppinterpreter filename)