チキンスキーム 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 )
)
)
そして私はそれをインクルードとして持ってきます
trythis.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 の内容を読み込んで文字列を評価しますか? または、他の何か?
ティア、
まだまだ勉強中のスティーブ