For example, I want to开发者_高级运维 break the long string in the below panic statement:
(panic "Truth-assignment length is longer than the number of propositions!")
I have tried
(panic "Truth-assignment length is longer than the number \
of propositions!")
and
(panic "Truth-assignment length is longer than the number
of propositions!")
and they both don't work. Googling hasn't turned up anything either.Use string-append with the built-in formatting of your IDE:
(panic (string-append "Truth-assignment length is longer "
"than the number of propositions!"))
Not all Scheme specifications define a way to break long strings. The answer to your question depends on which Scheme you are using. I believe R6RS includes a method like the first one you tried. Others might provide no such option, forcing you to either reduce the length of your strings, have very long lines, or use string-append with smaller strings.
Have a look at these links: http://www.mail-archive.com/r6rs-discuss@lists.r6rs.org/msg01810.html http://practical-scheme.net/gauche/ (search for 2008/2/13)
精彩评论