Question

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.

Was it helpful?

Solution

Use string-append with the built-in formatting of your IDE:

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

OTHER TIPS

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)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top