鸡计划 4.8.0.5
大家好,
假设我有一个包含顶级定义的文本文件
topLevelDef.txt
(define techDisplays '(
( AG1 fillerIgnore AG1_fillerIgnore t t nil t nil )
( AG2 drawing AG2_drawing t t nil t t )
)
)
我把它作为一个包含
试试this.scm
(use extras format posix posix-extras regex regex-literals utils srfi-13)
(include "./mytech/mytech.tf.techDisplays") ; works when hard-coded
;include inn-file) ; want to pass it in as an arg
(define write-out-techDisplays
(lambda()
(for-each
(lambda(rule-as-list-of-symbols)
(begin
(set! rule-as-list-of-strings ( map symbol->string rule-as-list-of-symbols))
(print (string-join rule-as-list-of-strings ))
)
)
techDisplays
)
)
)
(define (main args)
(set! inn-file ( car args))
(set! out-file (cadr args))
(with-output-to-file out-file write-out-techDisplays)
0
)
那么我该如何实现呢?通过以某种方式延迟对包含的评估?或者读取 inn-file 的内容并以某种方式评估字符串?或者是其他东西?
TIA,
仍在学习的史蒂夫