schemenewlineescapingline-breakslong-lines

How do you break long string lines in Scheme?


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.


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!"))