2010-02-05 34 views
1

例如,我想打破在下面的恐慌聲明一長串:
(panic "Truth-assignment length is longer than the number of propositions!")

我已經試過
(panic "Truth-assignment length is longer than the number \
of propositions!")



of propositions!")

,他們都不要沒有工作。谷歌搜索也沒有發現任何東西。如何在計劃中打破長字符串行?

回答

2

使用字符串追加與內置在IDE中的格式:

(panic (string-append "Truth-assignment length is longer " 
         "than the number of propositions!")) 
1

並非所有的Scheme規範都定義了一種破解長字符串的方法。您的問題的答案取決於您使用的是哪個Scheme。我相信R6RS包含一種像您嘗試的第一種方法。其他人可能不提供這樣的選項,迫使你減少字符串的長度,排成很長的行,或者使用字符串附加更小的字符串。

看一看這些鏈接: http://www.mail-archive.com/[email protected]/msg01810.html http://practical-scheme.net/gauche/(搜索2008年2月13日)